/// <summary> /// Adds a PropertyType, which does not belong to a PropertyGroup. /// </summary> /// <param name="propertyType"><see cref="PropertyType"/> to add</param> /// <returns>Returns <c>True</c> if PropertyType was added, otherwise <c>False</c></returns> public bool AddPropertyType(PropertyType propertyType) { if (PropertyTypeExists(propertyType.Alias) == false) { _propertyTypes.Add(propertyType); return(true); } return(false); }
/// <summary> /// Adds a PropertyType, which does not belong to a PropertyGroup. /// </summary> /// <param name="propertyType"><see cref="PropertyType"/> to add</param> /// <returns>Returns <c>True</c> if PropertyType was added, otherwise <c>False</c></returns> public bool AddPropertyType(PropertyType propertyType) { if (propertyType.HasIdentity == false) { propertyType.Key = Guid.NewGuid(); } if (PropertyTypeExists(propertyType.Alias) == false) { _propertyTypes.Add(propertyType); return(true); } return(false); }
public object DeepClone() { var newGroup = new PropertyTypeCollection(); foreach (var p in this) { newGroup.Add((PropertyType)p.DeepClone()); } return(newGroup); }
public object DeepClone() { var clone = new PropertyTypeCollection(IsPublishing); foreach (var propertyType in this) { clone.Add((PropertyType)propertyType.DeepClone()); } return(clone); }
/// <summary> /// Adds a PropertyType, which does not belong to a PropertyGroup. /// </summary> /// <param name="propertyType"><see cref="PropertyType"/> to add</param> /// <returns>Returns <c>True</c> if PropertyType was added, otherwise <c>False</c></returns> public bool AddPropertyType(PropertyType propertyType) { if (PropertyTypeExists(propertyType.Alias) == false) { _propertyTypes.Add(propertyType); _propertyTypes.CollectionChanged += PropertyTypesChanged; return(true); } return(false); }
internal PropertyGroup Clone() { var clone = (PropertyGroup)this.MemberwiseClone(); var collection = new PropertyTypeCollection(); foreach (var propertyType in this.PropertyTypes) { var property = propertyType.Clone(); property.ResetIdentity(); property.ResetDirtyProperties(false); collection.Add(property); } clone.PropertyTypes = collection; clone.ResetIdentity(); clone.ResetDirtyProperties(false); return(clone); }