Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ResourceWs.ResourceDataSet resDs = this.PsiInterfaces.PsiResourceService.ReadUserList(ResourceActiveFilter.Active);
- ResourceWs.ResourceDataSet.ResourcesRow[] resRow =
- (ResourceWs.ResourceDataSet.ResourcesRow[])resDs.Resources.Select(resFilter);
- if (resRow.Length >= 1)
- {
- Debug.Assert(resRow.Length == 1, "The resource row must be one only");
- Log.Instance.Verbose(
- string.Format(
- "ReadResourceName. RES_UID: '{0}' -> WRES_ACCOUNT: '{1}', RES_NAME: '{2}' (exit)",
- resRow[0].RES_UID,
- resRow[0].WRES_ACCOUNT,
- resRow[0].RES_NAME),
- LoggingAreaCategory.EpmAdapter);
- if (resNameFmt == ResourceNameType.AccountName)
- {
- return resRow[0].WRES_ACCOUNT;
- }
- else
- {
- return resRow[0].RES_NAME;
- }
- }
- else
- {
- string msg = string.Format("ReadResourceName. Cannot identify resource Uid: '{0}'", resUid);
- Log.Instance.Warning(
- msg,
- LoggingAreaCategory.EpmAdapter,
- EventID.IdentifyResourceFailure);
- throw new ArgumentException(msg, "resUid");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement