public static Property AddOrRetrieve( this PropertyCollection properties, string name, Type type, ValueUseOption valueUsage, object defaultValue) { return(properties.AddOrRetrieve(name, TypeReference.Create(type), valueUsage, defaultValue)); }
public static Property AddOrRetrieve( this PropertyCollection properties, string name, ITypeReference typeReference, ValueUseOption valueUsage, object defaultValue) { if (!properties.ContainsName(name)) { properties.Add(new Property(name, typeReference, valueUsage, defaultValue)); } return(properties.GetItemByName(name)); }