コード例 #1
0
ファイル: Collection.cs プロジェクト: Plankankul/Zenity
 public void ToCxml(string filePath)
 {
     using (StreamWriter writer = File.CreateText(filePath))
     {
         CxmlSerializer.Serialize(writer.BaseStream, this);
     }
 }
コード例 #2
0
ファイル: PivotHandlers.cs プロジェクト: Plankankul/Zenity
        public void ProcessRequest(HttpContext context)
        {
            string src = context.Request.QueryString["src"];

            //Build the collection in response to any query parameters.
            //Collection collection = FileExplorerCollection.MakeCollection(src);
            Collection collection = ODataCollectionSource.MakeOdataCollection(src);

            string cacheKey = Guid.NewGuid().ToString("N") + ".dzc";

            collection.ImgBaseName  = cacheKey;
            context.Cache[cacheKey] = collection;
            context.Cache.Add(cacheKey, collection, null, DateTime.MaxValue, new TimeSpan(1, 0, 0),
                              CacheItemPriority.High, null);
            context.Response.ContentType = "text/xml";
            CxmlSerializer.Serialize(context.Response.Output, collection);
        }
コード例 #3
0
ファイル: Collection.cs プロジェクト: Plankankul/Zenity
 public void ToCxml(TextWriter textWriter)
 {
     CxmlSerializer.Serialize(textWriter, this);
 }
コード例 #4
0
ファイル: Collection.cs プロジェクト: Plankankul/Zenity
 public string ToCxml()
 {
     return(CxmlSerializer.Serialize(this));
 }