コード例 #1
0
        public override string ToString()
        {
            StringBuilder objValue = new StringBuilder();

            objValue.Append("CompressedSize" + PropertyValueDelimeter + CompressedSize.ToString());
            objValue.Append(PropertyDelimeter);
            objValue.Append("CreatedDate" + PropertyValueDelimeter + CreatedDate.ToString());
            objValue.Append(PropertyDelimeter);
            objValue.Append("FileName" + PropertyValueDelimeter + FileName);
            objValue.Append(PropertyDelimeter);
            objValue.Append("OriginalFilePath" + PropertyValueDelimeter + OriginalFilePath);
            objValue.Append(PropertyDelimeter);
            objValue.Append("RelativePath" + PropertyValueDelimeter + RelativePath);
            objValue.Append(PropertyDelimeter);
            objValue.Append("Size" + PropertyValueDelimeter + Size.ToString());
            objValue.Append(PropertyDelimeter);
            objValue.Append("Version" + PropertyValueDelimeter + Version);
            objValue.Append(PropertyDelimeter);

            StringBuilder objKeyValues = new StringBuilder();

            foreach (string strKey in Keys)
            {
                objKeyValues.Append(strKey);
                objKeyValues.Append(KeyValueDelimeter);
            }
            objValue.Append("Keys" + PropertyValueDelimeter + objKeyValues.ToString());

            return(objValue.ToString());
        }
コード例 #2
0
 public void WriteHeader(System.Xml.XmlElement node)
 {
     node.SetAttribute("Size", Size.ToString());
     node.SetAttribute("CompressedSize", CompressedSize.ToString());
     node.SetAttribute("Checksum", String.Format("{0:x8}", Adler32));
     node.SetAttribute("FileTime", String.Format("{0:x8}", FileTime));
     node.SetAttribute("Algorithm", Algorithm.ToString());
 }
コード例 #3
0
ファイル: PackageFile.cs プロジェクト: thbin/TraceLab
        internal void WriteManifestInfo(System.Xml.XmlWriter writer)
        {
            writer.WriteAttributeString("ID", ID);

            writer.WriteAttributeString("Path", Path);
            writer.WriteAttributeString("CompressedHash", CompressedHash);
            writer.WriteAttributeString("CompressedSize", CompressedSize.ToString());
            writer.WriteAttributeString("UncompressedHash", UncompressedHash);
            writer.WriteAttributeString("UncompressedSize", UncompressedSize.ToString());
        }