private void SetTrusteeNameEntityStatus(sid_item sidItem, StatusEnumeration status) { if (sidItem.status.Equals(StatusEnumeration.doesnotexist) || sidItem.status.Equals(StatusEnumeration.error)) { sidItem.trustee_name.status = status; sidItem.trustee_name.Value = string.Empty; } }
private void CollectSidItemSystemData(sid_item sidItem) { var wmiObjects = this.SearchSIDObjectsOnTarget(sidItem.trustee_name.Value); if ((wmiObjects == null) || (wmiObjects.Count() == 0)) { throw new KeyNotFoundException(); } var userAccount = wmiObjects.First(); sidItem.trustee_domain = OvalHelper.CreateItemEntityWithStringValue(userAccount.GetFieldValueAsString("Domain")); sidItem.trustee_sid = OvalHelper.CreateItemEntityWithStringValue(userAccount.GetValueOf("SID").ToString()); }