Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / Workflow / Activities / ServiceOperationInfoTypeConverter.cs / 1305376 / ServiceOperationInfoTypeConverter.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Workflow.Activities { using System; using System.ComponentModel; using System.Globalization; class ServiceOperationInfoTypeConverter : TypeConverter { public ServiceOperationInfoTypeConverter() { } public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { return false; } public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { if (destinationType == typeof(string)) { return true; } return base.CanConvertTo(context, destinationType); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(string)) { OperationInfoBase serviceOperationInfo = value as OperationInfoBase; if (serviceOperationInfo != null) { string contractName = serviceOperationInfo.GetContractFullName(null); if (string.IsNullOrEmpty(contractName) || string.IsNullOrEmpty(serviceOperationInfo.Name)) { return string.Empty; } return string.Format(CultureInfo.InvariantCulture, "{0}.{1}", contractName, serviceOperationInfo.Name); } } return base.ConvertTo(context, culture, value, destinationType); } public override bool GetPropertiesSupported(ITypeDescriptorContext context) { return false; } } } // 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
- EasingQuaternionKeyFrame.cs
- LicFileLicenseProvider.cs
- OdbcErrorCollection.cs
- X509Certificate2.cs
- ListItem.cs
- AttachmentCollection.cs
- OlePropertyStructs.cs
- AuthenticationModuleElementCollection.cs
- DateTimePickerDesigner.cs
- PageWrapper.cs
- ExpressionLink.cs
- TreeViewEvent.cs
- DataFieldConverter.cs
- PropertyPushdownHelper.cs
- CompileLiteralTextParser.cs
- HtmlButton.cs
- XmlDataLoader.cs
- RuntimeCompatibilityAttribute.cs
- FlowLayout.cs
- ExpressionBuilder.cs
- TimeStampChecker.cs
- SMSvcHost.cs
- Int64AnimationUsingKeyFrames.cs
- EventMemberCodeDomSerializer.cs
- TextUtf8RawTextWriter.cs
- QilExpression.cs
- DataGridViewLayoutData.cs
- EventLogPermission.cs
- GcSettings.cs
- WebServiceTypeData.cs
- WpfSharedXamlSchemaContext.cs
- RegexWriter.cs
- SplitterEvent.cs
- TreeNode.cs
- CommonGetThemePartSize.cs
- AuthenticationException.cs
- AuthorizationRuleCollection.cs
- ClaimSet.cs
- Debug.cs
- FontUnitConverter.cs
- User.cs
- StringCollection.cs
- OfTypeExpression.cs
- WebPartTracker.cs
- ParserStack.cs
- CharacterBufferReference.cs
- HostedController.cs
- BaseResourcesBuildProvider.cs
- SingleAnimation.cs
- TemplateColumn.cs
- InteropExecutor.cs
- _HelperAsyncResults.cs
- PrimitiveXmlSerializers.cs
- PointAnimation.cs
- SoapObjectInfo.cs
- AuthenticatingEventArgs.cs
- InternalBufferOverflowException.cs
- DownloadProgressEventArgs.cs
- BuildProvidersCompiler.cs
- StringFreezingAttribute.cs
- BamlRecordHelper.cs
- ADMembershipProvider.cs
- StackOverflowException.cs
- XmlSignatureManifest.cs
- ResponseBodyWriter.cs
- VisualCollection.cs
- ConstructorExpr.cs
- XdrBuilder.cs
- LexicalChunk.cs
- HttpResponseBase.cs
- DataSetUtil.cs
- DependencyObject.cs
- SystemWebCachingSectionGroup.cs
- PropertyToken.cs
- MessagingActivityHelper.cs
- TextDecorationCollection.cs
- DbProviderConfigurationHandler.cs
- BevelBitmapEffect.cs
- InheritanceAttribute.cs
- GetIndexBinder.cs
- WeakHashtable.cs
- BitmapEffectDrawingContent.cs
- GridView.cs
- PolicyManager.cs
- GradientStop.cs
- StrongNameSignatureInformation.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- Baml2006KnownTypes.cs
- HandlerFactoryCache.cs
- SortAction.cs
- SoapInteropTypes.cs
- entityreference_tresulttype.cs
- Vector3DConverter.cs
- objectquery_tresulttype.cs
- XpsS0ValidatingLoader.cs
- BitmapEffectGroup.cs
- RightsManagementResourceHelper.cs
- WpfPayload.cs
- UmAlQuraCalendar.cs
- DefaultShape.cs