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
- CodeArgumentReferenceExpression.cs
- ArgumentsParser.cs
- XamlPointCollectionSerializer.cs
- DependentTransaction.cs
- LinqDataSourceValidationException.cs
- CorrelationManager.cs
- FormParameter.cs
- XmlElementAttributes.cs
- WebConfigurationManager.cs
- UIAgentMonitor.cs
- AnnotationMap.cs
- FrameworkContentElement.cs
- SmtpReplyReaderFactory.cs
- XmlTextReader.cs
- RuleInfoComparer.cs
- FixedSOMTableRow.cs
- DataGridViewCellConverter.cs
- SHA1Managed.cs
- XmlQueryTypeFactory.cs
- PersianCalendar.cs
- SmtpAuthenticationManager.cs
- DataGridViewCellValidatingEventArgs.cs
- Parameter.cs
- CustomGrammar.cs
- Filter.cs
- QilXmlReader.cs
- BulletDecorator.cs
- DocumentGrid.cs
- UserControlCodeDomTreeGenerator.cs
- StyleCollection.cs
- XamlInt32CollectionSerializer.cs
- TextDocumentView.cs
- EventBindingService.cs
- CompModHelpers.cs
- DrawingBrush.cs
- BindingMemberInfo.cs
- ArrangedElement.cs
- CodeCastExpression.cs
- DataGridViewLinkCell.cs
- EventTrigger.cs
- AnchorEditor.cs
- Transactions.cs
- RichTextBox.cs
- ModelUtilities.cs
- DataGridViewCellMouseEventArgs.cs
- DeclarationUpdate.cs
- DataGridTableCollection.cs
- Selection.cs
- ZoomComboBox.cs
- DataSourceHelper.cs
- RTLAwareMessageBox.cs
- ExtenderProvidedPropertyAttribute.cs
- SchemaImporterExtensionElement.cs
- WebServiceMethodData.cs
- MessagePartProtectionMode.cs
- LinqDataSourceEditData.cs
- LogReserveAndAppendState.cs
- _UriSyntax.cs
- SettingsSavedEventArgs.cs
- SqlDependencyListener.cs
- basenumberconverter.cs
- WindowsContainer.cs
- OutputCacheSettings.cs
- ZoneLinkButton.cs
- TableCell.cs
- Operators.cs
- InstallerTypeAttribute.cs
- Formatter.cs
- JsonReaderWriterFactory.cs
- TextEditorParagraphs.cs
- UInt32.cs
- PasswordBox.cs
- TCPClient.cs
- MissingMethodException.cs
- ExpressionNormalizer.cs
- DataProtection.cs
- StringUtil.cs
- XsdSchemaFileEditor.cs
- Vector3DKeyFrameCollection.cs
- CodeVariableDeclarationStatement.cs
- PlainXmlSerializer.cs
- PartialCachingAttribute.cs
- CheckedPointers.cs
- BinaryHeap.cs
- DataDocumentXPathNavigator.cs
- GACIdentityPermission.cs
- LocalizationComments.cs
- IApplicationTrustManager.cs
- FaultException.cs
- HashRepartitionEnumerator.cs
- GeneralTransform3DTo2DTo3D.cs
- Function.cs
- OrCondition.cs
- MetadataReference.cs
- UrlAuthFailureHandler.cs
- DebuggerService.cs
- ListBoxItem.cs
- DocumentGridPage.cs
- DBCommandBuilder.cs
- TransferRequestHandler.cs