Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / SamlAuthorizationDecisionClaimResource.cs / 1305376 / SamlAuthorizationDecisionClaimResource.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Tokens { using System; using System.Collections.Generic; using System.IdentityModel.Claims; using System.Runtime.Serialization; using System.Text; [DataContract] public class SamlAuthorizationDecisionClaimResource { [DataMember] string resource; [DataMember] SamlAccessDecision accessDecision; [DataMember] string actionNamespace; [DataMember] string actionName; [OnDeserialized] void OnDeserialized(StreamingContext ctx) { if (String.IsNullOrEmpty(resource)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("resource"); if (String.IsNullOrEmpty(actionName)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("actionName"); } public SamlAuthorizationDecisionClaimResource(string resource, SamlAccessDecision accessDecision, string actionNamespace, string actionName) { if (String.IsNullOrEmpty(resource)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("resource"); if (String.IsNullOrEmpty(actionName)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("actionName"); this.resource = resource; this.accessDecision = accessDecision; this.actionNamespace = actionNamespace; this.actionName = actionName; } public string Resource { get { return this.resource; } } public SamlAccessDecision AccessDecision { get { return this.accessDecision; } } public string ActionNamespace { get { return this.actionNamespace; } } public string ActionName { get { return this.actionName; } } public override bool Equals(object obj) { if (obj == null) return false; if (ReferenceEquals(this, obj)) return true; SamlAuthorizationDecisionClaimResource rhs = obj as SamlAuthorizationDecisionClaimResource; if (rhs == null) return false; return ((this.ActionName == rhs.ActionName) && (this.ActionNamespace == rhs.ActionNamespace) && (this.Resource == rhs.Resource) && (this.AccessDecision == rhs.AccessDecision)); } public override int GetHashCode() { return (this.resource.GetHashCode() ^ this.accessDecision.GetHashCode()); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Tokens { using System; using System.Collections.Generic; using System.IdentityModel.Claims; using System.Runtime.Serialization; using System.Text; [DataContract] public class SamlAuthorizationDecisionClaimResource { [DataMember] string resource; [DataMember] SamlAccessDecision accessDecision; [DataMember] string actionNamespace; [DataMember] string actionName; [OnDeserialized] void OnDeserialized(StreamingContext ctx) { if (String.IsNullOrEmpty(resource)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("resource"); if (String.IsNullOrEmpty(actionName)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("actionName"); } public SamlAuthorizationDecisionClaimResource(string resource, SamlAccessDecision accessDecision, string actionNamespace, string actionName) { if (String.IsNullOrEmpty(resource)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("resource"); if (String.IsNullOrEmpty(actionName)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("actionName"); this.resource = resource; this.accessDecision = accessDecision; this.actionNamespace = actionNamespace; this.actionName = actionName; } public string Resource { get { return this.resource; } } public SamlAccessDecision AccessDecision { get { return this.accessDecision; } } public string ActionNamespace { get { return this.actionNamespace; } } public string ActionName { get { return this.actionName; } } public override bool Equals(object obj) { if (obj == null) return false; if (ReferenceEquals(this, obj)) return true; SamlAuthorizationDecisionClaimResource rhs = obj as SamlAuthorizationDecisionClaimResource; if (rhs == null) return false; return ((this.ActionName == rhs.ActionName) && (this.ActionNamespace == rhs.ActionNamespace) && (this.Resource == rhs.Resource) && (this.AccessDecision == rhs.AccessDecision)); } public override int GetHashCode() { return (this.resource.GetHashCode() ^ this.accessDecision.GetHashCode()); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AssemblyName.cs
- DataServiceRequestOfT.cs
- DispatcherExceptionFilterEventArgs.cs
- StylusPointDescription.cs
- Sequence.cs
- HitTestDrawingContextWalker.cs
- CellRelation.cs
- ContextStack.cs
- RuleAttributes.cs
- Automation.cs
- errorpatternmatcher.cs
- AssemblyHash.cs
- SqlRecordBuffer.cs
- NavigationEventArgs.cs
- UTF7Encoding.cs
- SQLMoney.cs
- WebPartConnectionsConnectVerb.cs
- EncodingTable.cs
- ReadWriteObjectLock.cs
- Constraint.cs
- ParallelDesigner.cs
- SlotInfo.cs
- BooleanFacetDescriptionElement.cs
- FigureHelper.cs
- AssemblyCache.cs
- TraceEventCache.cs
- VirtualPathUtility.cs
- QuotedPrintableStream.cs
- OleDbWrapper.cs
- MSAAEventDispatcher.cs
- SimpleTextLine.cs
- XMLUtil.cs
- ServerValidateEventArgs.cs
- ProgressPage.cs
- RepeaterItemCollection.cs
- WindowsFormsHost.cs
- PerformanceCountersElement.cs
- OwnerDrawPropertyBag.cs
- UnitySerializationHolder.cs
- TransformGroup.cs
- ComponentRenameEvent.cs
- ClientTargetSection.cs
- LocatorManager.cs
- ElementHostAutomationPeer.cs
- SQLMembershipProvider.cs
- ListView.cs
- BasicHttpSecurityElement.cs
- RijndaelManaged.cs
- AutomationPropertyInfo.cs
- EmptyCollection.cs
- WebPartsSection.cs
- GenericIdentity.cs
- BamlVersionHeader.cs
- XPathNodePointer.cs
- TypeToken.cs
- PathFigureCollection.cs
- ImportOptions.cs
- ResourceDictionary.cs
- CorrelationManager.cs
- TableRowCollection.cs
- BinaryMethodMessage.cs
- XmlRawWriter.cs
- Vector3DConverter.cs
- NeutralResourcesLanguageAttribute.cs
- HandledEventArgs.cs
- Site.cs
- ManagementOptions.cs
- Span.cs
- CodeVariableReferenceExpression.cs
- MergeLocalizationDirectives.cs
- PrintDialog.cs
- CalendarAutomationPeer.cs
- ProcessHost.cs
- AnimatedTypeHelpers.cs
- AsyncOperation.cs
- DataGridComponentEditor.cs
- Size3D.cs
- GreenMethods.cs
- ScriptResourceAttribute.cs
- ActiveXHost.cs
- GenericTypeParameterBuilder.cs
- TextEditorThreadLocalStore.cs
- DBAsyncResult.cs
- HMACSHA384.cs
- CfgParser.cs
- Roles.cs
- DataControlPagerLinkButton.cs
- CmsInterop.cs
- DataListCommandEventArgs.cs
- Oci.cs
- RubberbandSelector.cs
- PseudoWebRequest.cs
- LineUtil.cs
- GcHandle.cs
- OutKeywords.cs
- Number.cs
- StrongNameUtility.cs
- SqlTypeConverter.cs
- OperationResponse.cs
- DbProviderSpecificTypePropertyAttribute.cs