SenseNet.ContentRepository.Storage.Schema.SchemaRoot.ToXml C# (CSharp) Метод

ToXml() публичный Метод

public ToXml ( ) : string
Результат string
		public string ToXml()
		{
			StringBuilder sb = new StringBuilder();
            sb.AppendLine("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
			sb.Append("<StorageSchema xmlns=\"").Append(RepositoryStorageSchemaXmlNamespace).AppendLine("\">");

			if (_propertyTypes.Count > 0)
			{
                sb.AppendLine("	<UsedPropertyTypes>");
				foreach (PropertyType propertyType in _propertyTypes)
					PropertyTypeToXml(propertyType, sb, "\t\t");
                sb.AppendLine("	</UsedPropertyTypes>");
			}

			if (_nodeTypes.Count > 0)
			{
                sb.AppendLine("	<NodeTypeHierarchy>");
				foreach (NodeType nt in _nodeTypes)
					if (nt.Parent == null)
						NodeTypeToXml(nt, sb, "\t\t");
                sb.AppendLine("	</NodeTypeHierarchy>");
			}

			if (_contentListTypes.Count > 0)
			{
                sb.AppendLine("	<ContentListTypes>");
                foreach (var lt in _contentListTypes)
					ContentListTypeToXml(lt, sb, "\t\t");
                sb.AppendLine("	</ContentListTypes>");
			}

			if (_permissionTypes.Count > 0)
			{
                sb.AppendLine("	<PermissionTypes>");
				foreach (PermissionType permType in _permissionTypes)
					PermissionTypeToXml(permType, sb, "\t\t");
                sb.AppendLine("	</PermissionTypes>");
			}

            sb.AppendLine("</StorageSchema>");
			return sb.ToString();
		}
		private static void NodeTypeToXml(NodeType nt, StringBuilder sb, string indent)