public bool IsInScope(string pMsgSID, bool IsRealScopeID) { string pMsgFID = ""; bool TestForFID = false; if (IsScopingEnabled && !string.IsNullOrEmpty(FederationID) && !string.IsNullOrEmpty(pMsgSID)) { TestForFID = true; string[] t = pMsgSID.Split(';'); if (t.Length > 1) { pMsgSID = t[0]; pMsgFID = t[1]; } } if (IsRealScopeID) { return((!IsScopingEnabled && string.IsNullOrEmpty(pMsgSID)) || (!string.IsNullOrEmpty(ScopeID) && ScopeID.Equals(pMsgSID)) || (TestForFID && !string.IsNullOrEmpty(FederationID) && FederationID.Equals(GetRealScopeID(pMsgFID)))); //GRSI: rare } else { return((!IsScopingEnabled && string.IsNullOrEmpty(pMsgSID)) || (!string.IsNullOrEmpty(ScopeID) && ScopeID.Equals(GetRealScopeID(pMsgSID))) || //GRSI: rare (TestForFID && !string.IsNullOrEmpty(FederationID) && FederationID.Equals(GetRealScopeID(pMsgFID)))); //GRSI: rare } }
public bool RomBasedRestart(ScopeID targetScopeID) { if (targetScopeID == (ScopeID)null) { return(false); } try { IEqualityComparer <object> processingComparer = base.m_odpContext.ProcessingComparer; bool result = true; while (!targetScopeID.Equals(this.GetScopeID(), processingComparer) && (result = this.MoveNext())) { } return(result); } catch (Exception) { throw new RenderingObjectModelException(ProcessingErrorCode.rsRombasedRestartFailedTypeMismatch, base.m_memberDef.Group.Name); } }
public string RemoveScopeID(string pCommand, bool IsUnscopedAllowed, bool IsAllowedForeignProcessing) { if (string.IsNullOrEmpty(pCommand)) { return(pCommand); } if (!IsScopingEnabled) { if (IsUnscopedAllowed && pCommand.Contains("@")) { return(pCommand.Substring(0, pCommand.IndexOf("@", StringComparison.Ordinal))); } return(pCommand); } string tRSID = FindRealScopeID(pCommand); //GRSI: rare if (string.IsNullOrEmpty(tRSID)) { if (IsUnscopedAllowed) { return(pCommand); } return("SCOPEVIOLATION"); } else { if (!IsAllowedForeignProcessing && !ScopeID.Equals(tRSID)) { if (string.IsNullOrEmpty(RProSco) || !tRSID.Equals(RProSco)) { return("SCOPEVIOLATION"); } } string tC = pCommand.Substring(0, pCommand.IndexOf('@')); return(tC); } }