本文整理汇总了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);
}