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
- URIFormatException.cs
- RepeaterItemCollection.cs
- CellTreeSimplifier.cs
- TextRangeAdaptor.cs
- ProfileProvider.cs
- DataViewSetting.cs
- DeferredRunTextReference.cs
- CurrentChangingEventManager.cs
- Command.cs
- DiffuseMaterial.cs
- RectKeyFrameCollection.cs
- TdsParserSessionPool.cs
- WebPartDisplayModeCancelEventArgs.cs
- documentation.cs
- Image.cs
- VectorCollection.cs
- FromReply.cs
- RenderTargetBitmap.cs
- AdRotator.cs
- WebRequestModulesSection.cs
- ZipIOExtraFieldElement.cs
- InstalledVoice.cs
- DataGridColumnFloatingHeader.cs
- FileSystemInfo.cs
- AdornedElementPlaceholder.cs
- VisualStateGroup.cs
- DataServiceKeyAttribute.cs
- InvalidDataException.cs
- ParameterSubsegment.cs
- Int32.cs
- ParameterBuilder.cs
- BrowserInteropHelper.cs
- hebrewshape.cs
- IPipelineRuntime.cs
- JsonReaderWriterFactory.cs
- LinqDataView.cs
- ApplicationActivator.cs
- HtmlTableCell.cs
- VersionedStream.cs
- _AcceptOverlappedAsyncResult.cs
- PocoEntityKeyStrategy.cs
- TimeSpan.cs
- WorkflowInlining.cs
- UnauthorizedWebPart.cs
- Html32TextWriter.cs
- WsiProfilesElementCollection.cs
- Vector3dCollection.cs
- WebPartConnectionsCloseVerb.cs
- ItemTypeToolStripMenuItem.cs
- HttpApplicationFactory.cs
- QueryableDataSourceEditData.cs
- UTF8Encoding.cs
- CharConverter.cs
- SimpleTextLine.cs
- DBConnectionString.cs
- TextTreeTextElementNode.cs
- ScrollChrome.cs
- assertwrapper.cs
- TextEditor.cs
- PtsCache.cs
- InputLanguage.cs
- RegistrationServices.cs
- ToolTipService.cs
- DebugTraceHelper.cs
- OleDragDropHandler.cs
- _UncName.cs
- PrePrepareMethodAttribute.cs
- TagMapInfo.cs
- WorkflowMarkupSerializationProvider.cs
- ImageDrawing.cs
- SamlEvidence.cs
- Marshal.cs
- PingOptions.cs
- OleCmdHelper.cs
- ForceCopyBuildProvider.cs
- FragmentQuery.cs
- BulletedList.cs
- XmlDocument.cs
- BlurEffect.cs
- SudsCommon.cs
- ChannelEndpointElement.cs
- LambdaCompiler.Expressions.cs
- EntityDataSourceChangingEventArgs.cs
- EngineSite.cs
- ContentTextAutomationPeer.cs
- Vector3D.cs
- NegotiateStream.cs
- HashCodeCombiner.cs
- AsyncResult.cs
- Soap.cs
- UrlAuthFailedErrorFormatter.cs
- DataServiceCollectionOfT.cs
- RelatedView.cs
- XmlUtf8RawTextWriter.cs
- SiteMapSection.cs
- SimpleTypeResolver.cs
- BufferedStream.cs
- AllowedAudienceUriElementCollection.cs
- HttpResponseHeader.cs
- Rect3D.cs