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
- DataGridViewCellToolTipTextNeededEventArgs.cs
- BitmapEffectState.cs
- KeyProperty.cs
- XpsFixedDocumentReaderWriter.cs
- FixedBufferAttribute.cs
- DragCompletedEventArgs.cs
- ParameterBuilder.cs
- XmlDataSource.cs
- TargetParameterCountException.cs
- ScriptManagerProxy.cs
- TypeGeneratedEventArgs.cs
- TemplateBamlRecordReader.cs
- SqlClientPermission.cs
- XamlReader.cs
- XamlStackWriter.cs
- StateBag.cs
- WinFormsSpinner.cs
- Scripts.cs
- WebPartCatalogAddVerb.cs
- SynchronizedKeyedCollection.cs
- AcceptorSessionSymmetricTransportSecurityProtocol.cs
- TraceListener.cs
- Int16.cs
- ToolStripPanel.cs
- MemberHolder.cs
- QueueProcessor.cs
- BitmapPalette.cs
- ObservableDictionary.cs
- XmlBinaryReader.cs
- ColumnHeaderConverter.cs
- SplineKeyFrames.cs
- ProcessHostFactoryHelper.cs
- NamedPermissionSet.cs
- CompareValidator.cs
- ValidationRule.cs
- EventRoute.cs
- AssertFilter.cs
- HttpWebRequestElement.cs
- DataGridViewCellValidatingEventArgs.cs
- CellLabel.cs
- _DigestClient.cs
- ValueQuery.cs
- ComponentConverter.cs
- MTConfigUtil.cs
- XmlNamespaceMapping.cs
- SimplePropertyEntry.cs
- EntityDataSourceContainerNameItem.cs
- PageContentCollection.cs
- CellLabel.cs
- EffectiveValueEntry.cs
- contentDescriptor.cs
- WorkflowDesigner.cs
- TypeBuilderInstantiation.cs
- SrgsSubset.cs
- JobCollate.cs
- RtType.cs
- processwaithandle.cs
- StylusPlugin.cs
- ToolStripSplitStackLayout.cs
- TransformBlockRequest.cs
- MetadataCache.cs
- MemberRelationshipService.cs
- CounterCreationDataCollection.cs
- HttpRuntime.cs
- ApplicationSecurityInfo.cs
- InstanceContextManager.cs
- DataObject.cs
- Message.cs
- WebPartMovingEventArgs.cs
- loginstatus.cs
- MetadataUtilsSmi.cs
- StringValueConverter.cs
- EntityDataSourceDataSelection.cs
- Type.cs
- Tuple.cs
- ServiceManager.cs
- TemplatePagerField.cs
- NativeObjectSecurity.cs
- RegexMatchCollection.cs
- ListSortDescription.cs
- NameValueFileSectionHandler.cs
- SqlDataSourceWizardForm.cs
- ToolStripItemCollection.cs
- regiisutil.cs
- VerificationException.cs
- DescriptionAttribute.cs
- SessionEndingEventArgs.cs
- PropertyGrid.cs
- MailBnfHelper.cs
- StylusPlugin.cs
- WindowsButton.cs
- BitmapEffectInput.cs
- DataListComponentEditor.cs
- DNS.cs
- RepeatInfo.cs
- DBNull.cs
- SelfSignedCertificate.cs
- TextEditorContextMenu.cs
- RegexCompiler.cs
- StrokeNodeOperations.cs