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
- XmlTextReaderImplHelpers.cs
- ObjectAnimationBase.cs
- EventWaitHandleSecurity.cs
- TabPageDesigner.cs
- TextViewBase.cs
- SystemIcons.cs
- SessionIDManager.cs
- HtmlUtf8RawTextWriter.cs
- AsyncOperation.cs
- ImportException.cs
- ContainerTracking.cs
- TextTreePropertyUndoUnit.cs
- HttpSessionStateBase.cs
- FileUtil.cs
- SerializationInfo.cs
- DiscoveryServerProtocol.cs
- EntityConnection.cs
- AttributeCollection.cs
- DataGridItem.cs
- SessionIDManager.cs
- RecommendedAsConfigurableAttribute.cs
- RichTextBoxConstants.cs
- CounterCreationDataCollection.cs
- BoundColumn.cs
- SafeThreadHandle.cs
- FigureHelper.cs
- DateTimeParse.cs
- Stylus.cs
- HttpRuntimeSection.cs
- GridViewHeaderRowPresenter.cs
- ImageList.cs
- LocalBuilder.cs
- DrawingAttributes.cs
- GridViewColumn.cs
- MachineKeySection.cs
- TdsParserStateObject.cs
- UnsafeNetInfoNativeMethods.cs
- SystemDiagnosticsSection.cs
- OrderedEnumerableRowCollection.cs
- DiagnosticsConfiguration.cs
- ThreadInterruptedException.cs
- WebPartHelpVerb.cs
- MatcherBuilder.cs
- MSAANativeProvider.cs
- RoleServiceManager.cs
- TextFormatterImp.cs
- WebRequestModuleElementCollection.cs
- metadatamappinghashervisitor.cs
- DataGridViewTextBoxCell.cs
- ToolStripContentPanel.cs
- AttributeCollection.cs
- TimeSpanOrInfiniteConverter.cs
- XmlAnyAttributeAttribute.cs
- RuntimeConfig.cs
- Image.cs
- TrustManager.cs
- TransactionScopeDesigner.cs
- AbsoluteQuery.cs
- AxisAngleRotation3D.cs
- ColumnResizeUndoUnit.cs
- GradientSpreadMethodValidation.cs
- RemoteWebConfigurationHostStream.cs
- SimpleHandlerFactory.cs
- EntityModelSchemaGenerator.cs
- SafeEventLogReadHandle.cs
- ManagementQuery.cs
- XMLSyntaxException.cs
- DecimalAnimationBase.cs
- VisualStyleTypesAndProperties.cs
- ValueQuery.cs
- DetailsViewRow.cs
- MatrixAnimationBase.cs
- MethodCallConverter.cs
- DesignerTransaction.cs
- XmlCountingReader.cs
- Glyph.cs
- RuntimeEnvironment.cs
- XmlMtomWriter.cs
- PKCS1MaskGenerationMethod.cs
- DecimalAnimationBase.cs
- NestedContainer.cs
- ClosureBinding.cs
- DocumentAutomationPeer.cs
- RawStylusActions.cs
- PerformanceCounterNameAttribute.cs
- ByteStreamMessageEncoderFactory.cs
- TreeWalker.cs
- RequestCachingSection.cs
- RichTextBoxConstants.cs
- ImageAutomationPeer.cs
- XmlWrappingWriter.cs
- ChtmlTextBoxAdapter.cs
- PropertyEntry.cs
- IPGlobalProperties.cs
- ScrollItemProviderWrapper.cs
- DataSourceCacheDurationConverter.cs
- OpenTypeLayoutCache.cs
- EncoderFallback.cs
- XmlEncoding.cs
- BufferedMessageWriter.cs