Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / Workflow / Activities / SendActivityValidator.cs / 1305376 / SendActivityValidator.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Workflow.Activities { using System.Workflow.ComponentModel.Compiler; using System.Workflow.ComponentModel; using System.ServiceModel; using System.Reflection; using System.Collections.Generic; class SendActivityValidator : ActivityValidator { public override ValidationErrorCollection Validate( ValidationManager manager, object obj) { ValidationErrorCollection validationErrors = base.Validate(manager, obj); SendActivity sendActivity = obj as SendActivity; if (sendActivity == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("obj", SR2.GetString(SR2.Error_ArgumentTypeInvalid, "obj", typeof(SendActivity))); } ITypeProvider typeProvider = manager.GetService(typeof(ITypeProvider)) as ITypeProvider; if (typeProvider == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( SR2.GetString(SR2.General_MissingService, typeof(ITypeProvider).Name))); } if (sendActivity.ServiceOperationInfo == null) { validationErrors.Add( new ValidationError( SR2.GetString(SR2.Error_ServiceOperationInfoNotSpecified, sendActivity.Name), WorkflowServicesErrorNumbers.Error_OperationInfoNotSpecified, false, "ServiceOperationInfo")); } else { // validate operation info // ValidationErrorCollection operationInfoValidationErrors = ValidationHelper.ValidateOperationInfo( sendActivity, sendActivity.ServiceOperationInfo, manager); validationErrors.AddRange(operationInfoValidationErrors); // do not validate parameter binding if the operation info is not valid // we might generate noise and false positives. // if (operationInfoValidationErrors.Count == 0) { validationErrors.AddRange( ValidationHelper.ValidateParameterBindings(sendActivity, sendActivity.ServiceOperationInfo, sendActivity.ParameterBindings, manager)); } // validate the endpoint // validationErrors.AddRange( ValidationHelper.ValidateChannelToken(sendActivity, manager)); } return validationErrors; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebPartAddingEventArgs.cs
- AnnotationResourceCollection.cs
- ToolStripDropTargetManager.cs
- ParentQuery.cs
- StaticResourceExtension.cs
- UTF32Encoding.cs
- CodeAccessSecurityEngine.cs
- IdnElement.cs
- FontFamily.cs
- TemplatedMailWebEventProvider.cs
- PersistNameAttribute.cs
- RoleGroupCollection.cs
- ImageField.cs
- MatrixAnimationUsingKeyFrames.cs
- ETagAttribute.cs
- ExpressionVisitor.cs
- WindowsStartMenu.cs
- ChtmlTextWriter.cs
- EntitySqlException.cs
- SharedDp.cs
- Rotation3DKeyFrameCollection.cs
- GeneralTransform.cs
- Connector.cs
- XamlPoint3DCollectionSerializer.cs
- XmlnsCache.cs
- Size3D.cs
- PageThemeCodeDomTreeGenerator.cs
- WizardPanel.cs
- CultureInfoConverter.cs
- SplitContainer.cs
- SqlTriggerAttribute.cs
- TableStyle.cs
- ProvidePropertyAttribute.cs
- Substitution.cs
- Literal.cs
- UnsafeNativeMethods.cs
- TypeCollectionPropertyEditor.cs
- CharacterBufferReference.cs
- SynchronizationHandlesCodeDomSerializer.cs
- Timer.cs
- DbDataAdapter.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- ConsoleCancelEventArgs.cs
- MonitorWrapper.cs
- CrossContextChannel.cs
- X509RawDataKeyIdentifierClause.cs
- ToolStripEditorManager.cs
- RemoteWebConfigurationHostServer.cs
- SerializableAttribute.cs
- SerializationObjectManager.cs
- Frame.cs
- IODescriptionAttribute.cs
- MenuCommands.cs
- StaticDataManager.cs
- Fonts.cs
- CodeParameterDeclarationExpressionCollection.cs
- DrawItemEvent.cs
- RegexInterpreter.cs
- UniqueEventHelper.cs
- Assert.cs
- ObjectDataSource.cs
- TransformPatternIdentifiers.cs
- PropertyValueChangedEvent.cs
- VisualBasicSettingsHandler.cs
- Logging.cs
- CreateRefExpr.cs
- MetadataItemSerializer.cs
- ProxyFragment.cs
- SchemaName.cs
- SoapTypeAttribute.cs
- InkCanvasSelection.cs
- Model3DGroup.cs
- GenericNameHandler.cs
- RenderData.cs
- Win32SafeHandles.cs
- UnSafeCharBuffer.cs
- ContentTextAutomationPeer.cs
- EventListener.cs
- StylusPointProperty.cs
- FixedSOMSemanticBox.cs
- RemoteDebugger.cs
- EntityClientCacheEntry.cs
- WindowsListView.cs
- CoreSwitches.cs
- LocalBuilder.cs
- FigureParaClient.cs
- GenerateHelper.cs
- Ipv6Element.cs
- XmlEncoding.cs
- VerticalAlignConverter.cs
- InputEventArgs.cs
- ToolStripTemplateNode.cs
- ColumnPropertiesGroup.cs
- TextTrailingWordEllipsis.cs
- DropShadowEffect.cs
- XmlSubtreeReader.cs
- SystemResourceHost.cs
- BasicHttpMessageSecurityElement.cs
- ThrowHelper.cs
- LicenseContext.cs