Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / Workflow / Activities / OperationParameterInfo.cs / 1305376 / OperationParameterInfo.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Workflow.Activities { using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Drawing.Design; using System.Diagnostics.CodeAnalysis; using System.Net.Security; using System.Reflection; using System.ServiceModel; using System.Workflow.ComponentModel; using System.Workflow.ComponentModel.Compiler; using System.Workflow.ComponentModel.Serialization; [Browsable(true)] [DesignerSerializer(typeof(DependencyObjectCodeDomSerializer), typeof(CodeDomSerializer))] public sealed class OperationParameterInfo : DependencyObject { [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] public static readonly DependencyProperty AttributesProperty = DependencyProperty.Register("Attributes", typeof(ParameterAttributes), typeof(OperationParameterInfo), new PropertyMetadata(DependencyPropertyOptions.Metadata)); [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] public static readonly DependencyProperty NameProperty = DependencyProperty.Register("Name", typeof(string), typeof(OperationParameterInfo), new PropertyMetadata(null, DependencyPropertyOptions.Metadata)); [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] public static readonly DependencyProperty ParameterTypeProperty = DependencyProperty.Register("ParameterType", typeof(Type), typeof(OperationParameterInfo), new PropertyMetadata(typeof(void), DependencyPropertyOptions.Metadata)); [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] public static readonly DependencyProperty PositionProperty = DependencyProperty.Register("Position", typeof(int), typeof(OperationParameterInfo), new PropertyMetadata(-1, DependencyPropertyOptions.Metadata)); public OperationParameterInfo() { } public OperationParameterInfo(string parameterName) { SetValue(NameProperty, parameterName); } internal OperationParameterInfo(ParameterInfo parameter) { if (parameter == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("parameter"); } SetValue(OperationParameterInfo.NameProperty, parameter.Name); SetValue(OperationParameterInfo.PositionProperty, parameter.Position); SetValue(OperationParameterInfo.AttributesProperty, parameter.Attributes); SetValue(OperationParameterInfo.ParameterTypeProperty, parameter.ParameterType); } public ParameterAttributes Attributes { get { return (ParameterAttributes) GetValue(AttributesProperty); } set { SetValue(AttributesProperty, value); } } public bool IsIn { get { return ((this.Attributes & ParameterAttributes.In) != 0); } } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] public bool IsLcid { get { return ((this.Attributes & ParameterAttributes.Lcid) != 0); } } public bool IsOptional { get { return ((this.Attributes & ParameterAttributes.Optional) != 0); } } public bool IsOut { get { return ((this.Attributes & ParameterAttributes.Out) != 0); } } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] public bool IsRetval { get { return ((this.Attributes & ParameterAttributes.Retval) != 0); } } public string Name { get { return (string) GetValue(NameProperty); } set { SetValue(NameProperty, value); } } public Type ParameterType { get { return (Type) GetValue(ParameterTypeProperty); } set { SetValue(ParameterTypeProperty, value); } } public int Position { get { return (int) GetValue(PositionProperty); } set { SetValue(PositionProperty, value); } } public OperationParameterInfo Clone() { OperationParameterInfo clonedParameter = new OperationParameterInfo(); clonedParameter.Name = this.Name; clonedParameter.Attributes = this.Attributes; clonedParameter.Position = this.Position; clonedParameter.ParameterType = this.ParameterType; return clonedParameter; } public override bool Equals(object obj) { OperationParameterInfo parameter = obj as OperationParameterInfo; if (parameter == null) { return false; } if (String.Compare(parameter.Name, this.Name, StringComparison.Ordinal) != 0) { return false; } if (parameter.Attributes != this.Attributes) { return false; } if (parameter.Position != this.Position) { return false; } if (parameter.ParameterType != this.ParameterType) { return false; } return true; } public override int GetHashCode() { return base.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
- X509InitiatorCertificateClientElement.cs
- DataRowCollection.cs
- AttributeProviderAttribute.cs
- StringComparer.cs
- ManagementBaseObject.cs
- documentsequencetextpointer.cs
- MatchingStyle.cs
- XPathDescendantIterator.cs
- GcHandle.cs
- ParenthesizePropertyNameAttribute.cs
- ExpressionBinding.cs
- FontCacheLogic.cs
- DecoderFallbackWithFailureFlag.cs
- MemoryFailPoint.cs
- AppDomainManager.cs
- ColumnHeaderConverter.cs
- _WebProxyDataBuilder.cs
- XmlIncludeAttribute.cs
- _TransmitFileOverlappedAsyncResult.cs
- XPathNodeIterator.cs
- LineBreakRecord.cs
- versioninfo.cs
- MultipartContentParser.cs
- PageAsyncTaskManager.cs
- SmtpTransport.cs
- ClickablePoint.cs
- ConcurrentQueue.cs
- Dynamic.cs
- TreePrinter.cs
- SrgsGrammar.cs
- ModelFunction.cs
- NavigationEventArgs.cs
- InternalBase.cs
- OracleRowUpdatingEventArgs.cs
- HWStack.cs
- OdbcInfoMessageEvent.cs
- EventLogPermission.cs
- AsyncResult.cs
- ResourceExpressionBuilder.cs
- ChildDocumentBlock.cs
- RuntimeConfig.cs
- MultipartContentParser.cs
- precedingquery.cs
- EncryptedXml.cs
- Lock.cs
- WebPartConnectionsDisconnectVerb.cs
- MethodImplAttribute.cs
- DataGridViewRowEventArgs.cs
- rsa.cs
- CharStorage.cs
- DeleteIndexBinder.cs
- ConstructorArgumentAttribute.cs
- Slider.cs
- IsolatedStorageFile.cs
- SpecialNameAttribute.cs
- SqlFunctionAttribute.cs
- AbstractSvcMapFileLoader.cs
- IDReferencePropertyAttribute.cs
- DoubleAnimationUsingKeyFrames.cs
- QueueProcessor.cs
- CopyAttributesAction.cs
- ExpressionContext.cs
- HostedHttpTransportManager.cs
- ProfileGroupSettingsCollection.cs
- COM2TypeInfoProcessor.cs
- EncodingNLS.cs
- ContentPlaceHolder.cs
- TextReader.cs
- HttpCookieCollection.cs
- DecimalAnimationBase.cs
- SafeNativeMethods.cs
- NamespaceList.cs
- IItemProperties.cs
- TargetInvocationException.cs
- JavaScriptSerializer.cs
- TemplateBindingExtensionConverter.cs
- DataBindingHandlerAttribute.cs
- Soap12ServerProtocol.cs
- DataServiceClientException.cs
- HierarchicalDataBoundControl.cs
- RawUIStateInputReport.cs
- RootDesignerSerializerAttribute.cs
- FileDataSourceCache.cs
- PropertyMapper.cs
- NaturalLanguageHyphenator.cs
- WebPartChrome.cs
- ListBase.cs
- ProviderConnectionPoint.cs
- WindowHideOrCloseTracker.cs
- SparseMemoryStream.cs
- UserControlCodeDomTreeGenerator.cs
- LineServicesRun.cs
- ObjectComplexPropertyMapping.cs
- AsymmetricKeyExchangeFormatter.cs
- DateTimeEditor.cs
- Enlistment.cs
- EncryptedReference.cs
- RectValueSerializer.cs
- OleDbPropertySetGuid.cs
- UrlMappingsSection.cs