System.Security.SecurityElement.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            ToString("", sb, (obj, str) => ((StringBuilder)obj).Append(str));

            return sb.ToString();
        }

Same methods

SecurityElement::ToString ( string indent, object obj, string>.Action write ) : void

Usage Example

Beispiel #1
0
    //removePath将要删除的路径
    static public string GetFileListXMLString(List <string> fileList, string removePath)
    {
        var root = new System.Security.SecurityElement("root");

        foreach (var item in fileList)
        {
            string fileName = Path.GetFileName(item);
            string ext      = Path.GetExtension(item);
            if (string.Compare(ext, ".meta", true) == 0)
            {
                continue;
            }

            string filePath = null;
            if (IsUseAssetBundle)
            {
                filePath = item.Replace(removePath, "");
                root.AddChild(new System.Security.SecurityElement("k", fileName.ToLower()));
                root.AddChild(new System.Security.SecurityElement("v", filePath.ToLower()));
            }
            else
            {
                filePath = item.Replace(removePath, "");
                root.AddChild(new System.Security.SecurityElement("k", fileName));
                root.AddChild(new System.Security.SecurityElement("v", filePath));
            }
        }

        return(root.ToString());
    }
All Usage Examples Of System.Security.SecurityElement::ToString