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
- TextServicesCompartment.cs
- DesignerActionMethodItem.cs
- ManagementPath.cs
- BufferModeSettings.cs
- Positioning.cs
- RectAnimationBase.cs
- ReadContentAsBinaryHelper.cs
- HttpPostedFile.cs
- ApplicationSecurityManager.cs
- ConstantProjectedSlot.cs
- XmlCompatibilityReader.cs
- Rect.cs
- GeometryCombineModeValidation.cs
- TabItemWrapperAutomationPeer.cs
- StickyNoteHelper.cs
- DbQueryCommandTree.cs
- MetaChildrenColumn.cs
- Delegate.cs
- ResXResourceSet.cs
- SqlRetyper.cs
- Document.cs
- Mappings.cs
- ChannelTokenTypeConverter.cs
- WindowsFormsSectionHandler.cs
- DrawToolTipEventArgs.cs
- ScrollViewer.cs
- UnsafeNativeMethods.cs
- IntSecurity.cs
- HttpPostedFile.cs
- GenericEnumerator.cs
- BinaryReader.cs
- CodeStatement.cs
- DragDeltaEventArgs.cs
- AttributeEmitter.cs
- DataKey.cs
- DataServiceConfiguration.cs
- EmptyQuery.cs
- XmlTextAttribute.cs
- RenderData.cs
- ServiceProviders.cs
- GatewayIPAddressInformationCollection.cs
- PageThemeCodeDomTreeGenerator.cs
- ViewStateModeByIdAttribute.cs
- SystemEvents.cs
- TraceSection.cs
- DataGridViewRowCancelEventArgs.cs
- RtfToXamlReader.cs
- _IPv6Address.cs
- safex509handles.cs
- TemplateXamlTreeBuilder.cs
- PathTooLongException.cs
- RichTextBoxContextMenu.cs
- TextCompositionEventArgs.cs
- InputLanguageSource.cs
- PrintDialogException.cs
- CounterSampleCalculator.cs
- Executor.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ValidationManager.cs
- XmlReader.cs
- CallbackHandler.cs
- ProtocolsSection.cs
- ListChangedEventArgs.cs
- XsltOutput.cs
- XDRSchema.cs
- DetailsViewRow.cs
- UpDownEvent.cs
- XmlAnyElementAttributes.cs
- HexParser.cs
- CellRelation.cs
- MSHTMLHost.cs
- EffectiveValueEntry.cs
- GridViewItemAutomationPeer.cs
- PiiTraceSource.cs
- ThrowHelper.cs
- XNodeNavigator.cs
- Row.cs
- NavigationProperty.cs
- LinkDesigner.cs
- StrokeSerializer.cs
- XmlDataSourceView.cs
- StylusSystemGestureEventArgs.cs
- namescope.cs
- ChunkedMemoryStream.cs
- QilScopedVisitor.cs
- sqlpipe.cs
- MouseGesture.cs
- StopStoryboard.cs
- EnvironmentPermission.cs
- SolidColorBrush.cs
- VerificationException.cs
- ErrorHandlerModule.cs
- graph.cs
- SizeLimitedCache.cs
- AddInSegmentDirectoryNotFoundException.cs
- HtmlEncodedRawTextWriter.cs
- XmlDesignerDataSourceView.cs
- BamlLocalizabilityResolver.cs
- ProcessHostConfigUtils.cs
- EntityContainer.cs