Skip to content

Commit

Permalink
implicit operator desteği eklendi. (#67)
Browse files Browse the repository at this point in the history
* "implicit operator" ile "property" değerleri daha sade belirlenebiliyor.

* "implicit operator" e göre Readme.md güncellendi.
  • Loading branch information
mzuvin committed Oct 26, 2022
1 parent 4d822f6 commit 55a21cd
Show file tree
Hide file tree
Showing 898 changed files with 7,182 additions and 906 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ private static void Main(string[] args)
{
var invoice = new UblTr.MainDoc.InvoiceType()
{
UUID = new UblTr.Common.UUIDType() { Value = Guid.NewGuid().ToString() },
UBLVersionID = new UblTr.Common.UBLVersionIDType() { Value = "2.1" },
CustomizationID = new UblTr.Common.CustomizationIDType() { Value = "TR1.2" },
ProfileID = new UblTr.Common.ProfileIDType() { Value = "TEMELFATURA" },
ID = new UblTr.Common.IDType() { Value = "INV20200000000001" },
CopyIndicator = new UblTr.Common.CopyIndicatorType() { Value = false }
UUID = Guid.NewGuid().ToString(),
UBLVersionID ="2.1",
CustomizationID = "TR1.2",
ProfileID ="TEMELFATURA",
ID = "INV20200000000001",
CopyIndicator = false
};

XmlSerializer xmlSerializer = new XmlSerializer(typeof(UblTr.MainDoc.InvoiceType));
Expand Down Expand Up @@ -81,12 +81,12 @@ private static void Main(string[] args)
{
var despatch = new UblTr.MainDoc.DespatchAdviceType()
{
UUID = new UblTr.Common.UUIDType() { Value = Guid.NewGuid().ToString() },
UBLVersionID = new UblTr.Common.UBLVersionIDType() { Value = "2.1" },
CustomizationID = new UblTr.Common.CustomizationIDType() { Value = "TR1.2" },
ProfileID = new UblTr.Common.ProfileIDType() { Value = "TEMELIRSALIYE" },
ID = new UblTr.Common.IDType() { Value = "IRS20200000000001" },
CopyIndicator = new UblTr.Common.CopyIndicatorType() { Value = false }
UUID = Guid.NewGuid().ToString(),
UBLVersionID = "2.1",
CustomizationID = "TR1.2",
ProfileID = "TEMELIRSALIYE",
ID = "IRS20200000000001",
CopyIndicator = false
};

XmlSerializer xmlSerializer = new XmlSerializer(typeof(UblTr.MainDoc.DespatchAdviceType));
Expand Down
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/AcceptedIndicatorType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AcceptedIndicator", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AcceptedIndicatorType : IndicatorType
{
}
public static implicit operator AcceptedIndicatorType(bool val)
{
return new AcceptedIndicatorType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AcceptedVariantsDescription", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AcceptedVariantsDescriptionType : TextType1
{
}
public static implicit operator AcceptedVariantsDescriptionType(string val)
{
return new AcceptedVariantsDescriptionType
{
Value = val
};
}
}
}
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/AccountFormatCodeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AccountFormatCode", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AccountFormatCodeType : CodeType1
{
}
public static implicit operator AccountFormatCodeType(string val)
{
return new AccountFormatCodeType
{
Value = val
};
}
}
}
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/AccountIDType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AccountID", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AccountIDType : IdentifierType1
{
}
public static implicit operator AccountIDType(string val)
{
return new AccountIDType
{
Value = val
};
}
}
}
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/AccountTypeCodeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AccountTypeCode", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AccountTypeCodeType : CodeType1
{
}
public static implicit operator AccountTypeCodeType(string val)
{
return new AccountTypeCodeType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AccountingCostCode", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AccountingCostCodeType : CodeType1
{
}
public static implicit operator AccountingCostCodeType(string val)
{
return new AccountingCostCodeType
{
Value = val
};
}
}
}
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/AccountingCostType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AccountingCost", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AccountingCostType : TextType1
{
}
public static implicit operator AccountingCostType(string val)
{
return new AccountingCostType
{
Value = val
};
}
}
}
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/ActionCodeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("ActionCode", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class ActionCodeType : CodeType1
{
}
public static implicit operator ActionCodeType(string val)
{
return new ActionCodeType
{
Value = val
};
}
}
}
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/ActivityTypeCodeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("ActivityTypeCode", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class ActivityTypeCodeType : CodeType1
{
}
public static implicit operator ActivityTypeCodeType(string val)
{
return new ActivityTypeCodeType
{
Value = val
};
}
}
}
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/ActivityTypeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("ActivityType", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class ActivityTypeType : TextType1
{
}
public static implicit operator ActivityTypeType(string val)
{
return new ActivityTypeType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("ActualDeliveryDate", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class ActualDeliveryDateType : DateType
{
}
public static implicit operator ActualDeliveryDateType(System.DateTime val)
{
return new ActualDeliveryDateType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("ActualDeliveryTime", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class ActualDeliveryTimeType : TimeType
{
}
public static implicit operator ActualDeliveryTimeType(System.DateTime val)
{
return new ActualDeliveryTimeType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("ActualDespatchDate", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class ActualDespatchDateType : DateType
{
}
public static implicit operator ActualDespatchDateType(System.DateTime val)
{
return new ActualDespatchDateType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("ActualDespatchTime", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class ActualDespatchTimeType : TimeType
{
}
public static implicit operator ActualDespatchTimeType(System.DateTime val)
{
return new ActualDespatchTimeType
{
Value = val
};
}
}
}
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/ActualPickupDateType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("ActualPickupDate", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class ActualPickupDateType : DateType
{
}
public static implicit operator ActualPickupDateType(System.DateTime val)
{
return new ActualPickupDateType
{
Value = val
};
}
}
}
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/ActualPickupTimeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("ActualPickupTime", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class ActualPickupTimeType : TimeType
{
}
public static implicit operator ActualPickupTimeType(System.DateTime val)
{
return new ActualPickupTimeType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("ActualTemperatureReductionQuantity", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class ActualTemperatureReductionQuantityType : QuantityType1
{
}
public static implicit operator ActualTemperatureReductionQuantityType(decimal val)
{
return new ActualTemperatureReductionQuantityType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AdValoremIndicator", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AdValoremIndicatorType : IndicatorType
{
}
public static implicit operator AdValoremIndicatorType(bool val)
{
return new AdValoremIndicatorType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AdditionalAccountID", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AdditionalAccountIDType : IdentifierType1
{
}
public static implicit operator AdditionalAccountIDType(string val)
{
return new AdditionalAccountIDType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AdditionalConditions", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AdditionalConditionsType : TextType1
{
}
public static implicit operator AdditionalConditionsType(string val)
{
return new AdditionalConditionsType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AdditionalInformation", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AdditionalInformationType : TextType1
{
}
public static implicit operator AdditionalInformationType(string val)
{
return new AdditionalInformationType
{
Value = val
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AdditionalStreetName", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AdditionalStreetNameType : NameType
{
}
public static implicit operator AdditionalStreetNameType(string val)
{
return new AdditionalStreetNameType
{
Value = val
};
}
}
}
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/AddressFormatCodeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AddressFormatCode", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AddressFormatCodeType : CodeType1
{
}
public static implicit operator AddressFormatCodeType(string val)
{
return new AddressFormatCodeType
{
Value = val
};
}
}
}
9 changes: 8 additions & 1 deletion Ubl-Tr/Common/CommonBasicComponents/AddressTypeCodeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ namespace UblTr.Common
[System.Xml.Serialization.XmlRootAttribute("AddressTypeCode", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class AddressTypeCodeType : CodeType1
{
}
public static implicit operator AddressTypeCodeType(string val)
{
return new AddressTypeCodeType
{
Value = val
};
}
}
}
Loading

0 comments on commit 55a21cd

Please sign in to comment.