当前位置: 首页>>代码示例>>C#>>正文


C# Collection.GetRootDirectory方法代码示例

本文整理汇总了C#中Collection.GetRootDirectory方法的典型用法代码示例。如果您正苦于以下问题:C# Collection.GetRootDirectory方法的具体用法?C# Collection.GetRootDirectory怎么用?C# Collection.GetRootDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Collection的用法示例。


在下文中一共展示了Collection.GetRootDirectory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: iFolderWeb

 public iFolderWeb(Collection collection)
 {
     this.DomainID = collection.Domain;
        this.ID = collection.ID;
        this.CollectionID = collection.ID;
        this.LocalIncarnation = collection.LocalIncarnation;
        DirNode dirNode = collection.GetRootDirectory();
        if(dirNode != null)
     this.UnManagedPath = dirNode.GetFullPath(collection);
        else
     this.UnManagedPath = "";
        this.ManagedPath = collection.ManagedPath;
        this.MasterIncarnation = collection.MasterIncarnation;
        this.Name = collection.Name;
        if(collection.Owner != null)
        {
     this.Owner = collection.Owner.Name;
     this.OwnerID = collection.Owner.UserID;
        }
        else
        {
     this.Owner = "Not available";
     this.OwnerID = "0";
        }
        this.SyncInterval =
     Simias.Policy.SyncInterval.GetInterval(collection);
        this.Synchronizable = collection.Synchronizable;
        this.Type = iFolderType;
        this.Description = "";
        this.IsSubscription = false;
        this.EnumeratedState = -1;
        this.IsWorkgroup = false;
        this.HasConflicts = collection.HasCollisions();
        Member tmpMember = collection.GetCurrentMember();
        this.CurrentUserID = tmpMember.UserID;
        this.CurrentUserRights = tmpMember.Rights.ToString();
        Simias.Policy.SyncInterval si = Simias.Policy.SyncInterval.Get(tmpMember, collection);
        this.EffectiveSyncInterval = si.Interval;
        DateTime lastSyncTime = Simias.Sync.SyncClient.GetLastSyncTime(collection.ID);
        if (collection.Role.Equals(SyncRoles.Master))
        {
     this.LastSyncTime = string.Empty;
     this.State = "Local";
        }
        else if (lastSyncTime.Equals(DateTime.MinValue))
        {
     this.LastSyncTime = string.Empty;
     this.State = "WaitSync";
        }
        else
        {
     this.LastSyncTime = lastSyncTime.ToString();
     this.State = collection.IsProxy ? "WaitSync" : "Local";
        }
        this.Role = collection.Role.ToString();
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:56,代码来源:iFolder.cs

示例2: AddressBook

 public AddressBook(Collection collection)
 {
     this.Domain = collection.Domain;
        this.DomainIdentity = collection.Domain;
        this.ID = collection.ID;
        this.LocalIncarnation = collection.LocalIncarnation;
        DirNode dirNode = collection.GetRootDirectory();
        if(dirNode != null)
     this.UnManagedPath = dirNode.GetFullPath(collection);
        else
     this.UnManagedPath = "";
        this.ManagedPath = collection.ManagedPath;
        this.MasterIncarnation = collection.MasterIncarnation;
        this.Name = collection.Name;
        this.Owner = collection.Owner.Name;
        this.RefreshInterval = collection.Interval;
        this.Synchronizable = collection.Synchronizable;
        this.Type = "AB:AddressBook";
        this.Description = "";
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:20,代码来源:AddressBook.cs

示例3: iFolderWeb

 public iFolderWeb(Collection collection, int infoToFetch)
 {
     Member tmpMember = null;
     this.DomainID = collection.Domain;
     this.ID = collection.ID;
     this.CollectionID = collection.ID;
     this.LocalIncarnation = collection.LocalIncarnation;
     if (infoToFetch > 0)
     {
         DirNode dirNode = collection.GetRootDirectory();
         if (dirNode != null)
             this.UnManagedPath = dirNode.GetFullPath(collection);
         else
             this.UnManagedPath = "";
         this.ManagedPath = collection.ManagedPath;
         this.MasterIncarnation = collection.MasterIncarnation;
         this.Name = collection.Name;
         DateTime lastSyncTime = Simias.Sync.SyncClient.GetLastSyncTime(collection.ID);
         if (collection.Role.Equals(SyncRoles.Master))
         {
             this.LastSyncTime = string.Empty;
             this.State = "Local";
         }
         else if (lastSyncTime.Equals(DateTime.MinValue))
         {
             this.LastSyncTime = string.Empty;
             this.State = "WaitSync";
         }
         else
         {
             this.LastSyncTime = lastSyncTime.ToString();
             this.State = collection.IsProxy ? "WaitSync" : "Local";
         }
         this.HasConflicts = collection.HasCollisions();
         tmpMember = collection.GetCurrentMember();
         this.CurrentUserID = tmpMember.UserID;
         this.CurrentUserRights = tmpMember.Rights.ToString();
         this.Role = collection.Role.ToString();
         this.ssl = collection.SSL;
         if (collection.EncryptionAlgorithm == null || collection.EncryptionAlgorithm == "")
             this.encryptionAlgorithm = "";
         else
             this.encryptionAlgorithm = collection.EncryptionAlgorithm;
         this.MigratediFolder = collection.MigratediFolder;
         tmpMember = collection.Owner;
         if (tmpMember != null)
         {
             this.Owner = tmpMember.Name;
             this.OwnerID = tmpMember.UserID;
             this.EffectiveSyncInterval = tmpMember.EffectiveSyncPolicy(collection);
         }
         else
         {
             this.Owner = "Not available";
             this.OwnerID = "0";
         }
         ICSList memberList;
         memberList = collection.GetMemberList();
         if (memberList.Count > 1)
             this.shared = true;
         else
             this.shared = false;
         this.iFolderSize = collection.StorageSize;
     }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:65,代码来源:iFolder.cs


注:本文中的Collection.GetRootDirectory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。