本文整理匯總了C#中System.Property.IsNullable方法的典型用法代碼示例。如果您正苦於以下問題:C# Property.IsNullable方法的具體用法?C# Property.IsNullable怎麽用?C# Property.IsNullable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Property
的用法示例。
在下文中一共展示了Property.IsNullable方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: IsRealNullable
protected virtual bool IsRealNullable(Property p)
{
var cls = p.ObjectClass as ObjectClass;
if(cls == null)
{
return p.IsNullable();
}
else
{
// Has to be nullalbe when not the base class in TPH hierarchies
return (cls.GetTableMapping() == TableMapping.TPH && cls.BaseObjectClass != null) || p.IsNullable();
}
}
示例2: NotifyingDataProperty
public NotifyingDataProperty(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, Serialization.SerializationMembersList serializationList, Property prop)
: this(_host, ctx, serializationList,
prop.GetElementTypeString(),
prop.Name, prop.Module.Namespace, "_" + prop.Name,
prop.IsCalculated(), prop.DisableExport == true,
prop.ObjectClass.Name, prop.IsNullable(),
prop.DefaultValue != null && !prop.IsCalculated(), // No default value for calculated properties, default values are used then for database migration
prop.ExportGuid)
{
}
示例3: DecorateElementType
internal static void DecorateElementType(Property obj, MethodReturnEventArgs<string> e, bool isStruct)
{
if (obj == null) throw new ArgumentNullException("obj");
if (e == null) throw new ArgumentNullException("e");
if (isStruct && obj.IsNullable())
{
e.Result += "?";
}
}
示例4: ApplyNotifyingValueProperty
protected override void ApplyNotifyingValueProperty(
Property prop,
Templates.Serialization.SerializationMembersList serList)
{
Properties.ProxyProperty.Call(Host, ctx,
serList, prop.Module.Namespace, prop.GetElementTypeString(), prop.Name, false, true,
prop.DefaultValue != null, prop.ObjectClass.GetDataTypeString(),
prop.GetClassName(),
prop.IsNullable(),
"_is" + prop.Name + "Set",
prop.ExportGuid,
prop.GetElementTypeString(),
"Proxy." + prop.Name,
prop.IsCalculated(),
prop.DisableExport == true);
}