Пример #1
0
 public void ToCxml(string filePath)
 {
     using (StreamWriter writer = File.CreateText(filePath))
     {
         CxmlSerializer.Serialize(writer.BaseStream, this);
     }
 }
Пример #2
0
        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
 public void ToCxml(TextWriter textWriter)
 {
     CxmlSerializer.Serialize(textWriter, this);
 }
Пример #4
0
 public string ToCxml()
 {
     return(CxmlSerializer.Serialize(this));
 }