SenseNet.ContentRepository.Storage.Schema.PropertyType.CheckPropertyTypeUsage C# (CSharp) Method

CheckPropertyTypeUsage() private method

private CheckPropertyTypeUsage ( string errorMessage ) : void
errorMessage string
return void
		internal void CheckPropertyTypeUsage(string errorMessage)
		{
			foreach (NodeType nodeType in this.SchemaRoot.NodeTypes)
				if (nodeType.PropertyTypes.Contains(this))
					throw new SchemaEditorCommandException(errorMessage);
		}

Usage Example

Esempio n. 1
0
        public void DeletePropertyType(PropertyType propertyType)
        {
            if (propertyType == null)
            {
                throw new ArgumentNullException("propertyType");
            }
            if (propertyType.SchemaRoot != this)
            {
                throw new SchemaEditorCommandException(SR.Exceptions.Schema.Msg_InconsistentHierarchy);
            }

            propertyType.CheckPropertyTypeUsage(SR.Exceptions.Schema.Msg_ProtectedPropetyTypeDeleteViolation);

            // remove slot
            this.PropertyTypes.Remove(propertyType);
        }
All Usage Examples Of SenseNet.ContentRepository.Storage.Schema.PropertyType::CheckPropertyTypeUsage