本文整理汇总了C#中Collection.HasCollisions方法的典型用法代码示例。如果您正苦于以下问题:C# Collection.HasCollisions方法的具体用法?C# Collection.HasCollisions怎么用?C# Collection.HasCollisions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Collection
的用法示例。
在下文中一共展示了Collection.HasCollisions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例2: 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;
}
}