本文整理汇总了C#中MonoDevelop.VersionControl.VersionInfo.HasLocalChange方法的典型用法代码示例。如果您正苦于以下问题:C# VersionInfo.HasLocalChange方法的具体用法?C# VersionInfo.HasLocalChange怎么用?C# VersionInfo.HasLocalChange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoDevelop.VersionControl.VersionInfo
的用法示例。
在下文中一共展示了VersionInfo.HasLocalChange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetSupportedOperations
internal protected virtual VersionControlOperation GetSupportedOperations (VersionInfo vinfo)
{
VersionControlOperation operations = VersionControlOperation.None;
bool exists = !vinfo.LocalPath.IsNullOrEmpty && (File.Exists (vinfo.LocalPath) || Directory.Exists (vinfo.LocalPath));
if (vinfo.IsVersioned) {
operations = VersionControlOperation.Commit | VersionControlOperation.Update;
if (!vinfo.HasLocalChange (VersionStatus.ScheduledAdd))
operations |= VersionControlOperation.Log;
if (exists) {
if (!vinfo.HasLocalChange (VersionStatus.ScheduledDelete))
operations |= VersionControlOperation.Remove;
if (vinfo.HasLocalChanges || vinfo.IsDirectory)
operations |= VersionControlOperation.Revert;
}
if (AllowLocking && !vinfo.IsDirectory) {
if (!vinfo.HasLocalChanges && (vinfo.Status & VersionStatus.LockOwned) == 0)
operations |= VersionControlOperation.Lock;
if ((vinfo.Status & VersionStatus.LockOwned) != 0)
operations |= VersionControlOperation.Unlock;
}
}
else if (exists) {
operations = VersionControlOperation.Add;
}
return operations;
}