public override bool IsReadOnlyProperty(Type type, string propertyName) { if (base.IsReadOnlyProperty(type, propertyName)) { return(true); } IClassMap classMap = this.Context.DomainMap.GetClassMap(type); if (classMap != null) { IPropertyMap propertyMap = classMap.GetPropertyMap(propertyName); if (propertyMap != null) { if (propertyMap.IsReadOnly) { return(true); } if (propertyMap.IsAssignedBySource) { return(true); } } } return(false); }
public override void SetPropertyNullStatus(object obj, string propertyName, bool isNull) { IClassMap classMap = this.Context.DomainMap.GetClassMap(obj.GetType()); if (classMap != null) { IPropertyMap propertyMap = classMap.GetPropertyMap(propertyName); if (propertyMap != null) { this.Context.SetNullValueStatus(obj, propertyName, isNull); } } }
public override bool GetPropertyNullStatus(object obj, string propertyName) { IClassMap classMap = this.Context.DomainMap.GetClassMap(obj.GetType()); if (classMap != null) { IPropertyMap propertyMap = classMap.GetPropertyMap(propertyName); if (propertyMap != null) { return(this.Context.GetNullValueStatus(obj, propertyName)); } } return(false); }
public override bool IsNullableProperty(Type type, string propertyName) { IClassMap classMap = this.Context.DomainMap.GetClassMap(type); if (classMap != null) { IPropertyMap propertyMap = classMap.GetPropertyMap(propertyName); if (propertyMap != null) { return(propertyMap.GetIsNullable()); } } return(false); }
public override Type GetListPropertyItemType(object obj, string propertyName) { IClassMap classMap = this.Context.DomainMap.GetClassMap(obj.GetType()); if (classMap != null) { IPropertyMap propertyMap = classMap.GetPropertyMap(propertyName); if (propertyMap != null) { return(GetTypeFromTypeName(propertyMap.ItemType)); } } return(null); }
public override bool IsListProperty(Type type, string propertyName) { IClassMap classMap = this.Context.DomainMap.GetClassMap(type); if (classMap != null) { IPropertyMap propertyMap = classMap.GetPropertyMap(propertyName); if (propertyMap != null) { return(propertyMap.IsCollection); } } return(base.IsListProperty(type, propertyName)); }
public Type GetPropertyType(string className, string propertyName) { IClassMap classMap = GetDomainMap().GetClassMap(className); if (classMap != null) { IPropertyMap propertyMap = classMap.GetPropertyMap(propertyName); if (propertyMap != null) { return(Type.GetType(propertyMap.DataType)); } } return(null); }
public bool HasProperty(string className, string propertyName) { IClassMap classMap = GetDomainMap().GetClassMap(className); if (classMap != null) { IPropertyMap propertyMap = classMap.GetPropertyMap(propertyName); if (propertyMap != null) { return(true); } } return(false); }
public bool IsMatch(MethodBase method, Type type) { string methodName = method.Name; if (!(methodName.StartsWith("set_"))) { return(false); } methodName = methodName.Substring(4); IClassMap classmap = context.DomainMap.GetClassMap(method.DeclaringType); if (classmap == null) { return(false); } return(classmap.GetPropertyMap(methodName) != null); }