/// <exclude /> public static bool TryValidateNamespace(string namespaceString, out string errorMessage) { errorMessage = ""; if (string.IsNullOrEmpty(namespaceString)) { errorMessage = StringResourceSystemFacade.GetString("Composite.NameValidation", "EmptyNamespace"); return(false); } string[] namespaceElements = namespaceString.Split('.'); foreach (string namespaceElement in namespaceElements) { if (NameValidation.TryValidateName(namespaceElement, out errorMessage) == false) { return(false); } } if (namespaceElements.Distinct().Count() < namespaceElements.Count()) { errorMessage = StringResourceSystemFacade.GetString("Composite.NameValidation", "DuplicateElementNamespace"); return(false); } return(true); }
/// <summary> /// Constructs a new instance. /// </summary> /// <param name="id">Permanent unique id for this field. This should never change.</param> /// <param name="name">Name (programmatic) of field </param> /// <param name="storeType">Type to use when storing field</param> /// <param name="instanceType">Type to use when field is exposed to .NET</param> /// <param name="inherited">True when this field is inherited from a super interface.</param> public DataFieldDescriptor(Guid id, string name, StoreFieldType storeType, Type instanceType, bool inherited) { _id = id; _name = NameValidation.ValidateName(name); this.StoreType = storeType; this.InstanceType = instanceType; this.FormRenderingProfile = new DataFieldFormRenderingProfile(); this.TreeOrderingProfile = new DataFieldTreeOrderingProfile(); this.Inherited = inherited; this.IsReadOnly = false; }