Пример #1
0
 public void Add(bool isCollection,
     string name,
     string hrefHost,
     string hrefUri,
     string contentType,
     string etag,
     long length,
     DateTime creationdate,
     DateTime lastModified)
 {
     //OneResponse oneResponse = new OneResponse(isCollection, name, hrefHost, hrefUri, contentType, etag, length, creationdate, lastModified);
     var oneResponse = new OneResponse(isCollection, hrefHost, hrefUri, contentType, etag, length, creationdate, lastModified);
     var oneWebDavList = _webDavDb.Get(hrefUri);
     foreach (var o in oneWebDavList) {
         //string tag;
         var index = _nameSpaceList.IndexOf(o.NameSpace);
         if (index == -1) {
             _nameSpaceList.Add(o.NameSpace);
             index = _nameSpaceList.Count - 1;
         }
         var tag = string.Format("ns{0}", index);
         oneResponse.Add(o.NameSpace, tag, o.Name, o.Value);
     }
     _ar.Add(oneResponse);
 }
Пример #2
0
        public void Add(bool isCollection,
                        string name,
                        string hrefHost,
                        string hrefUri,
                        string contentType,
                        string etag,
                        long length,
                        DateTime creationdate,
                        DateTime lastModified)
        {
            //OneResponse oneResponse = new OneResponse(isCollection, name, hrefHost, hrefUri, contentType, etag, length, creationdate, lastModified);
            var oneResponse   = new OneResponse(isCollection, hrefHost, hrefUri, contentType, etag, length, creationdate, lastModified);
            var oneWebDavList = _webDavDb.Get(hrefUri);

            foreach (var o in oneWebDavList)
            {
                //string tag;
                var index = _nameSpaceList.IndexOf(o.NameSpace);
                if (index == -1)
                {
                    _nameSpaceList.Add(o.NameSpace);
                    index = _nameSpaceList.Count - 1;
                }
                var tag = string.Format("ns{0}", index);
                oneResponse.Add(o.NameSpace, tag, o.Name, o.Value);
            }
            _ar.Add(oneResponse);
        }