コード例 #1
0
 /// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(CustomAttributeDataType other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.CustomAttributeDataTypeID == CustomAttributeDataTypeID);
 }
コード例 #2
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public CustomAttributeType(string customAttributeTypeName, CustomAttributeDataType customAttributeDataType, bool isRequired, CustomAttributeTypePurpose customAttributeTypePurpose) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.CustomAttributeTypeID     = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.CustomAttributeTypeName   = customAttributeTypeName;
     this.CustomAttributeDataTypeID = customAttributeDataType.CustomAttributeDataTypeID;
     this.IsRequired = isRequired;
     this.CustomAttributeTypePurposeID = customAttributeTypePurpose.CustomAttributeTypePurposeID;
 }
コード例 #3
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static CustomAttributeType CreateNewBlank(CustomAttributeDataType customAttributeDataType, CustomAttributeTypePurpose customAttributeTypePurpose)
 {
     return(new CustomAttributeType(default(string), customAttributeDataType, default(bool), customAttributeTypePurpose));
 }