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
- sqlmetadatafactory.cs
- securitycriticaldataClass.cs
- WriteTimeStream.cs
- UrlMapping.cs
- LeftCellWrapper.cs
- FunctionNode.cs
- XmlBoundElement.cs
- DbConnectionHelper.cs
- RowToFieldTransformer.cs
- XmlReader.cs
- SqlDataAdapter.cs
- Section.cs
- HeaderedContentControl.cs
- SweepDirectionValidation.cs
- XmlDeclaration.cs
- GcSettings.cs
- DayRenderEvent.cs
- EventHandlersStore.cs
- TriggerBase.cs
- DESCryptoServiceProvider.cs
- MemoryMappedViewStream.cs
- initElementDictionary.cs
- CreateInstanceBinder.cs
- CapabilitiesRule.cs
- UseLicense.cs
- MatrixKeyFrameCollection.cs
- AuthenticationConfig.cs
- WindowsPen.cs
- MdiWindowListItemConverter.cs
- SplitterCancelEvent.cs
- SplitContainerDesigner.cs
- OracleFactory.cs
- WorkflowViewManager.cs
- ErrorHandler.cs
- TextureBrush.cs
- DocumentPageHost.cs
- OutputCacheProviderCollection.cs
- WebPartsPersonalization.cs
- ObjectFullSpanRewriter.cs
- StoreItemCollection.Loader.cs
- ExpressionPrefixAttribute.cs
- PeerObject.cs
- UnmanagedMarshal.cs
- ColumnReorderedEventArgs.cs
- CodeDirectiveCollection.cs
- ApplicationFileCodeDomTreeGenerator.cs
- TagMapInfo.cs
- HtmlEmptyTagControlBuilder.cs
- RoleBoolean.cs
- TemplateBaseAction.cs
- PropertyEmitterBase.cs
- SoapEnumAttribute.cs
- StickyNoteContentControl.cs
- DataPointer.cs
- FolderNameEditor.cs
- StyleCollectionEditor.cs
- XmlSchemaException.cs
- PostBackOptions.cs
- FontResourceCache.cs
- WindowsUpDown.cs
- ImageListUtils.cs
- TextFindEngine.cs
- TreeViewCancelEvent.cs
- PartialCachingAttribute.cs
- MessageUtil.cs
- DateTimeUtil.cs
- FormsAuthenticationModule.cs
- SystemInformation.cs
- XslAstAnalyzer.cs
- Path.cs
- XmlILConstructAnalyzer.cs
- SessionParameter.cs
- CodeRegionDirective.cs
- AutoFocusStyle.xaml.cs
- IISUnsafeMethods.cs
- XmlLoader.cs
- TypeGeneratedEventArgs.cs
- GeometryCollection.cs
- EdmError.cs
- XsltLoader.cs
- InterleavedZipPartStream.cs
- MasterPageParser.cs
- HybridCollection.cs
- ISAPIRuntime.cs
- StrongNameIdentityPermission.cs
- DeviceFilterDictionary.cs
- DataGridViewCellStyleEditor.cs
- TemplateParser.cs
- EntityViewGenerationAttribute.cs
- FixedPageProcessor.cs
- ToolStripSystemRenderer.cs
- Html32TextWriter.cs
- EdmFunctions.cs
- HtmlInputImage.cs
- ComboBoxItem.cs
- StringConverter.cs
- PagedDataSource.cs
- EpmAttributeNameBuilder.cs
- ResourcePermissionBase.cs
- ScriptingProfileServiceSection.cs