コード例 #1
0
ファイル: SyncReplicaMetadata.cs プロジェクト: alex765022/IBN
        public static string KToString(SyncKnowledge knowlege)
        {
            String retVal = "";

            System.IO.MemoryStream   memStream = new System.IO.MemoryStream();
            System.Xml.XmlTextWriter writer    = new System.Xml.XmlTextWriter(memStream, Encoding.UTF8);
            writer.Formatting = System.Xml.Formatting.Indented;
            knowlege.WriteXml(writer);
            writer.Flush();
            memStream.Seek(0, System.IO.SeekOrigin.Begin);
            System.IO.StreamReader reader = new System.IO.StreamReader(memStream);
            retVal = reader.ReadToEnd();

            return(retVal);
        }
コード例 #2
0
        public static string GetSyncReplicaString(SyncKnowledge knowlege)
        {
            String retVal = "";

            MemoryStream  memStream = new MemoryStream();
            XmlTextWriter writer    = new XmlTextWriter(memStream, Encoding.UTF8);

            writer.Formatting = Formatting.Indented;
            knowlege.WriteXml(writer);
            writer.Flush();
            memStream.Seek(0, SeekOrigin.Begin);
            StreamReader reader = new StreamReader(memStream);

            retVal = reader.ReadToEnd();

            return(retVal);
        }
コード例 #3
0
ファイル: MySimpleSyncProvider.cs プロジェクト: 0anion0/IBN
        public static string GetSyncReplicaString(SyncKnowledge knowlege)
        {
            String retVal = "";

            MemoryStream memStream = new MemoryStream();
            XmlTextWriter writer = new XmlTextWriter(memStream, Encoding.UTF8);
            writer.Formatting = Formatting.Indented;
            knowlege.WriteXml(writer);
            writer.Flush();
            memStream.Seek(0, SeekOrigin.Begin);
            StreamReader reader = new StreamReader(memStream);
            retVal = reader.ReadToEnd();

            return retVal;
        }
コード例 #4
0
ファイル: SyncReplicaMetadata.cs プロジェクト: 0anion0/IBN
        public static string KToString(SyncKnowledge knowlege)
        {
            String retVal = "";

            System.IO.MemoryStream memStream = new System.IO.MemoryStream();
            System.Xml.XmlTextWriter writer = new System.Xml.XmlTextWriter(memStream, Encoding.UTF8);
            writer.Formatting = System.Xml.Formatting.Indented;
            knowlege.WriteXml(writer);
            writer.Flush();
            memStream.Seek(0, System.IO.SeekOrigin.Begin);
            System.IO.StreamReader reader = new System.IO.StreamReader(memStream);
            retVal = reader.ReadToEnd();

            return retVal;
        }