DavResourceVersion.cs :  » Network-Servers » WebDAV.NET-Server » Sphorium » WebDAV » Server » Framework » Classes » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Network Servers » WebDAV.NET Server 
WebDAV.NET Server » Sphorium » WebDAV » Server » Framework » Classes » DavResourceVersion.cs
using System;

namespace Sphorium.WebDAV.Server.Framework.Classes{

  /// <summary>
  /// WebDav Lock Property.
  /// </summary>
  [Serializable]
  public class DavResourceVersion : ICloneable
  {
    private string __comment = "";

    /// <summary>
    /// WebDav Resource Version
    /// </summary>
    public DavResourceVersion() { }

    /// <summary>
    /// Resource comment
    /// </summary>
    public string Comment
    {
      get
      {
        return this.__comment;
      }
      set
      {
        this.__comment = value;
      }
    }


    //
    //      
    //      /// <summary>
    //      /// Obtain the Xml representation of the lock information
    //      /// </summary>
    //      internal XmlNode ActiveLock {
    //        get {
    //          //TODO: Replace this so we don't use XmlDoc
    //
    //          //Build the XmlDocument and retrieve the requested node
    //          XmlDocument _xmlDocument = new XmlDocument();
    //          XmlNode _activeLockNode = _xmlDocument.CreateNode(XmlNodeType.Element, _xmlDocument.GetPrefixOfNamespace("DAV:"), "activelock", "DAV:");
    //          XmlElement _lockTypeElement = _xmlDocument.CreateElement("locktype", "DAV:");
    //          switch (this.LockType) {
    //            case LockType.Read:
    //              _lockTypeElement.AppendChild(_xmlDocument.CreateElement("read", "DAV:"));
    //              break;
    //
    //            case LockType.Write:
    //              _lockTypeElement.AppendChild(_xmlDocument.CreateElement("write", "DAV:"));
    //              break;
    //          }
    //
    //          XmlElement _lockScopeElement = _xmlDocument.CreateElement("lockscope", "DAV:");
    //          switch (this.LockScope) {
    //            case LockScope.Exclusive:
    //              _lockScopeElement.AppendChild(_xmlDocument.CreateElement("exclusive", "DAV:"));
    //              break;
    //
    //            case LockScope.Shared:
    //              _lockScopeElement.AppendChild(_xmlDocument.CreateElement("shared", "DAV:"));
    //              break;
    //          }
    //
    //          _activeLockNode.AppendChild(_lockScopeElement);
    //          _activeLockNode.AppendChild(_lockTypeElement);
    //
    //          //Append the depth
    //          XmlElement _depthElement = _xmlDocument.CreateElement("depth", "DAV:");
    //
    //          if (LockDepth == DepthType.Infinity) 
    //            _depthElement.InnerText = _lockDepth.ToString();
    //          else
    //            _depthElement.InnerText = (string)System.Enum.Parse(LockDepth.GetType(), LockDepth.ToString(), true);
    //          _activeLockNode.AppendChild(_depthElement);
    //
    //          //Append the owner
    //          XmlElement _lockOwner = _xmlDocument.CreateElement("owner", "DAV:");
    //          switch (this.LockOwnerType) {
    //            case LockOwnerType.User:
    //              _lockOwner.InnerText = this.LockOwner;
    //              break;
    //            case LockOwnerType.Href:
    //              XmlElement _hrefLockTokenElement = _xmlDocument.CreateElement("href", "DAV:");
    //              _hrefLockTokenElement.InnerText = this.LockOwner;
    //              _lockOwner.AppendChild(_hrefLockTokenElement);
    //              break;
    //          }
    //          _activeLockNode.AppendChild(_lockOwner);
    //
    //          //Append the timeout
    //          XmlElement _timeoutElement = _xmlDocument.CreateElement("timeout", "DAV:");
    //          _timeoutElement.InnerText = "Second-" + this.LockTimeout;
    //          _activeLockNode.AppendChild(_timeoutElement);
    //
    //          //Append the lockToken
    //          XmlElement _lockToken = _xmlDocument.CreateElement("locktoken", "DAV:");
    //          foreach (string _token in this.GetLockTokens()) {
    //            XmlElement _opaqueLockTokenElement = _xmlDocument.CreateElement("href", "DAV:");
    //            _opaqueLockTokenElement.InnerText = "opaquelocktoken:" + _token;
    //            _lockToken.AppendChild(_opaqueLockTokenElement);
    //          }
    //          _activeLockNode.AppendChild(_lockToken);
    //
    //          return _activeLockNode;
    //        }
    //      }



    #region ICloneable Members
    // Explicit interface method impl
    object ICloneable.Clone()
    {
      return this.Clone();
    }

    /// <summary>
    /// DavResourceVersion Clone
    /// </summary>
    /// <remarks>Deep copy</remarks>
    /// <returns></returns>
    public DavResourceVersion Clone()
    {
      // Start with a flat, memberwise copy
      DavResourceVersion _davResourceVersion = (DavResourceVersion)this.MemberwiseClone();
      return _davResourceVersion;
    }
    #endregion

  }
}


www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.