Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / Workflow / Activities / ContractMethodParameterInfo.cs / 1305376 / ContractMethodParameterInfo.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Workflow.Activities { using System; using System.Reflection; using System.ServiceModel; using System.Workflow.ComponentModel.Compiler; internal sealed class ContractMethodParameterInfo : ParameterInfo { internal ContractMethodParameterInfo(ContractMethodInfo member, OperationParameterInfo parameterInfo) { if (member == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("member"); } if (parameterInfo == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("parameterInfo"); } this.AttrsImpl = parameterInfo.Attributes; this.MemberImpl = member; this.PositionImpl = parameterInfo.Position; if (parameterInfo.Position >= 0) { this.NameImpl = parameterInfo.Name; string typeName = parameterInfo.ParameterType.FullName; if ((this.AttrsImpl & ParameterAttributes.Out) > 0) { typeName += '&'; // Append with & for (ref & out) parameter types if (this.Member.DeclaringType is DesignTimeType) { this.ClassImpl = (this.Member.DeclaringType as DesignTimeType).ResolveType(typeName); } else if (parameterInfo.ParameterType is DesignTimeType) { this.ClassImpl = (parameterInfo.ParameterType as DesignTimeType).ResolveType(typeName); } else { typeName += ", " + parameterInfo.ParameterType.Assembly.FullName; this.ClassImpl = Type.GetType(typeName); } } else { this.ClassImpl = parameterInfo.ParameterType; } } else { this.ClassImpl = parameterInfo.ParameterType; } } public override object[] GetCustomAttributes(bool inherit) { return GetCustomAttributes(typeof(object), inherit); } public override object[] GetCustomAttributes(Type attributeType, bool inherit) { if (attributeType == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("attributeType"); } if (this.ParameterType == null) { return new object[0]; } return this.ParameterType.GetCustomAttributes(attributeType, inherit); } public override bool IsDefined(Type attributeType, bool inherit) { if (attributeType == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("attributeType"); } if (this.ParameterType == null) { return false; } return this.ParameterType.IsDefined(attributeType, inherit); } } } // 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
- ImageInfo.cs
- FormsAuthenticationUser.cs
- HashAlgorithm.cs
- FontStretchConverter.cs
- RuntimeTrackingProfile.cs
- ArrayList.cs
- FilterQueryOptionExpression.cs
- RSAOAEPKeyExchangeDeformatter.cs
- HtmlGenericControl.cs
- ControlCachePolicy.cs
- TableCellCollection.cs
- StylusButtonEventArgs.cs
- MultiBinding.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- VerticalConnector.xaml.cs
- DateTimeConstantAttribute.cs
- XmlSchemaAttributeGroup.cs
- RelationshipDetailsRow.cs
- PropertyChangedEventArgs.cs
- ReadOnlyHierarchicalDataSource.cs
- Native.cs
- ButtonPopupAdapter.cs
- TextParaClient.cs
- TextRunCacheImp.cs
- SchemaNotation.cs
- IndexedEnumerable.cs
- __ConsoleStream.cs
- UInt32.cs
- SearchForVirtualItemEventArgs.cs
- AttributeExtensions.cs
- ThreadStateException.cs
- HtmlHead.cs
- BindUriHelper.cs
- GradientBrush.cs
- FloaterBaseParagraph.cs
- clipboard.cs
- CheckBox.cs
- DataGridViewSortCompareEventArgs.cs
- InvalidOleVariantTypeException.cs
- StagingAreaInputItem.cs
- DateTimePicker.cs
- MimeMapping.cs
- DataViewSettingCollection.cs
- WorkflowMarkupElementEventArgs.cs
- BinaryNode.cs
- SystemDropShadowChrome.cs
- EFDataModelProvider.cs
- DbConnectionInternal.cs
- formatstringdialog.cs
- IntSecurity.cs
- PhysicalOps.cs
- Bind.cs
- DbInsertCommandTree.cs
- CorrelationScope.cs
- GeometryGroup.cs
- Drawing.cs
- Decoder.cs
- HttpInputStream.cs
- Module.cs
- _ProxyChain.cs
- CachingHintValidation.cs
- PrimaryKeyTypeConverter.cs
- ReadOnlyNameValueCollection.cs
- RequestCachePolicyConverter.cs
- XamlInterfaces.cs
- VisualBrush.cs
- UrlPath.cs
- ColorInterpolationModeValidation.cs
- _ProxyRegBlob.cs
- StateMachineSubscriptionManager.cs
- Composition.cs
- SQLDoubleStorage.cs
- DrawingContextWalker.cs
- FontFamily.cs
- XmlSerializerNamespaces.cs
- Content.cs
- AccessText.cs
- DataSourceSelectArguments.cs
- TextRangeEditLists.cs
- KeyManager.cs
- SqlXmlStorage.cs
- ContentElement.cs
- ChtmlTextWriter.cs
- BuildResultCache.cs
- UntypedNullExpression.cs
- AutomationPeer.cs
- ReceiveActivityDesigner.cs
- IndexedString.cs
- HostSecurityManager.cs
- EventSetterHandlerConverter.cs
- Point3DIndependentAnimationStorage.cs
- LinearKeyFrames.cs
- Documentation.cs
- XMLSchema.cs
- SoapInteropTypes.cs
- EntityDataSourceSelectingEventArgs.cs
- AppSettingsExpressionBuilder.cs
- ProgressBarBrushConverter.cs
- WebSysDisplayNameAttribute.cs
- WorkflowMessageEventHandler.cs