// function to check if the class to be added to MOF is already present in repository // [Microsoft] 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); }