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
- PeerSecurityManager.cs
- ToolStripScrollButton.cs
- Matrix.cs
- WorkflowTimerService.cs
- KeyNotFoundException.cs
- SessionState.cs
- LabelLiteral.cs
- FormViewPagerRow.cs
- XmlValueConverter.cs
- ThicknessAnimation.cs
- CSharpCodeProvider.cs
- WebPartEditVerb.cs
- LinearGradientBrush.cs
- MexHttpBindingCollectionElement.cs
- SqlMethodAttribute.cs
- IntegerValidator.cs
- CallbackValidator.cs
- bidPrivateBase.cs
- DisposableCollectionWrapper.cs
- MultiplexingDispatchMessageFormatter.cs
- MetadataItemCollectionFactory.cs
- EdmItemError.cs
- SecurityElement.cs
- ValidationPropertyAttribute.cs
- References.cs
- TextServicesHost.cs
- BamlRecordReader.cs
- ParameterReplacerVisitor.cs
- DocumentEventArgs.cs
- StaticDataManager.cs
- ConvertersCollection.cs
- FileDataSourceCache.cs
- DataGridViewColumnDesigner.cs
- SafeSystemMetrics.cs
- Vector3DCollectionValueSerializer.cs
- HttpFileCollection.cs
- FixedDocument.cs
- ComboBoxAutomationPeer.cs
- StateManagedCollection.cs
- CommonBehaviorsSection.cs
- QilInvoke.cs
- BuildResult.cs
- DbXmlEnabledProviderManifest.cs
- Logging.cs
- InvalidOperationException.cs
- NetNamedPipeBinding.cs
- ConnectionProviderAttribute.cs
- WebBrowserUriTypeConverter.cs
- BrowsableAttribute.cs
- Helper.cs
- CellLabel.cs
- RectAnimationBase.cs
- ProxyFragment.cs
- MasterPageParser.cs
- RIPEMD160.cs
- Graph.cs
- EnumerableRowCollectionExtensions.cs
- AgileSafeNativeMemoryHandle.cs
- TraceLog.cs
- MSAANativeProvider.cs
- ValidatingReaderNodeData.cs
- AddingNewEventArgs.cs
- AlphabetConverter.cs
- FixedTextContainer.cs
- SqlDataSourceEnumerator.cs
- ProjectionAnalyzer.cs
- RangeValidator.cs
- Parser.cs
- EditorZone.cs
- MenuItem.cs
- CompiledELinqQueryState.cs
- SettingsSavedEventArgs.cs
- Geometry.cs
- ParenthesizePropertyNameAttribute.cs
- HttpContextServiceHost.cs
- PageVisual.cs
- EntitySet.cs
- UIntPtr.cs
- Bitmap.cs
- PerformanceCounterTraceRecord.cs
- SQLDateTime.cs
- WebPartVerb.cs
- ControlBuilder.cs
- ContentIterators.cs
- XmlSchemaAttribute.cs
- SvcFileManager.cs
- ElapsedEventArgs.cs
- ListItemConverter.cs
- HandlerMappingMemo.cs
- RadioButton.cs
- ValuePatternIdentifiers.cs
- _NestedMultipleAsyncResult.cs
- ApplicationProxyInternal.cs
- ValueTable.cs
- FileVersion.cs
- ToggleButton.cs
- UnionExpr.cs
- NameSpaceEvent.cs
- GenericsInstances.cs
- ObjectListComponentEditor.cs