本文整理匯總了C#中System.Management.ManagementClass.CompareTo方法的典型用法代碼示例。如果您正苦於以下問題:C# ManagementClass.CompareTo方法的具體用法?C# ManagementClass.CompareTo怎麽用?C# ManagementClass.CompareTo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Management.ManagementClass
的用法示例。
在下文中一共展示了ManagementClass.CompareTo方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: IsClassAlreadyPresentInRepository
private bool IsClassAlreadyPresentInRepository(ManagementObject obj)
{
bool flag = false;
string str = SchemaNaming.MakeClassPath(this.NamespaceName, (string)obj.SystemProperties["__CLASS"].Value);
if (SchemaNaming.DoesClassExist(str))
{
ManagementObject managementClass = new ManagementClass(str);
flag = managementClass.CompareTo(obj, ComparisonSettings.IgnoreObjectSource | ComparisonSettings.IgnoreCase);
}
return flag;
}
示例2: IsClassAlreadyPresentInRepository
// function to check if the class to be added to MOF is already present in repository
// [[....]] VSUQFE#2248 (VSWhidbey 231885)
bool IsClassAlreadyPresentInRepository(ManagementObject obj)
{
bool bRet = false;
string ClassPathInRepository = MakeClassPath(NamespaceName, (string)obj.SystemProperties["__CLASS"].Value);
if (DoesClassExist(ClassPathInRepository))
{
ManagementObject inst = new ManagementClass(ClassPathInRepository);
bRet = inst.CompareTo(obj, ComparisonSettings.IgnoreCase | ComparisonSettings.IgnoreObjectSource);
}
return bRet;
}