Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Server / System / Data / Services / Providers / ServiceOperationParameter.cs / 1305376 / ServiceOperationParameter.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Provides a type to represent parameter information for service // operations. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services.Providers { using System.Diagnostics; ///Use this type to represent a parameter on a service operation. [DebuggerVisualizer("ServiceOperationParameter={Name}")] public class ServiceOperationParameter { ///Parameter name. private readonly string name; ///Parameter type. private readonly ResourceType type; ///Is true, if the service operation parameter is set to readonly i.e. fully initialized and validated. /// No more changes can be made, after this is set to readonly. private bool isReadOnly; ////// Initializes a new /// Name of parameter. /// resource type of parameter value. public ServiceOperationParameter(string name, ResourceType parameterType) { WebUtil.CheckStringArgumentNull(name, "name"); WebUtil.CheckArgumentNull(parameterType, "parameterType"); if (parameterType.ResourceTypeKind != ResourceTypeKind.Primitive) { throw new ArgumentException(Strings.ServiceOperationParameter_TypeNotSupported(name, parameterType.FullName)); } this.name = name; this.type = parameterType; } ///. /// Name of parameter. public string Name { get { return this.name; } } ///Type of parameter values. public ResourceType ParameterType { get { return this.type; } } ////// PlaceHolder to hold custom state information about service operation parameter. /// public object CustomState { get; set; } ////// Returns true, if this parameter has been set to read only. Otherwise returns false. /// public bool IsReadOnly { get { return this.isReadOnly; } } ////// Sets this service operation parameter to readonly. /// public void SetReadOnly() { if (this.isReadOnly) { return; } this.isReadOnly = true; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Provides a type to represent parameter information for service // operations. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services.Providers { using System.Diagnostics; ///Use this type to represent a parameter on a service operation. [DebuggerVisualizer("ServiceOperationParameter={Name}")] public class ServiceOperationParameter { ///Parameter name. private readonly string name; ///Parameter type. private readonly ResourceType type; ///Is true, if the service operation parameter is set to readonly i.e. fully initialized and validated. /// No more changes can be made, after this is set to readonly. private bool isReadOnly; ////// Initializes a new /// Name of parameter. /// resource type of parameter value. public ServiceOperationParameter(string name, ResourceType parameterType) { WebUtil.CheckStringArgumentNull(name, "name"); WebUtil.CheckArgumentNull(parameterType, "parameterType"); if (parameterType.ResourceTypeKind != ResourceTypeKind.Primitive) { throw new ArgumentException(Strings.ServiceOperationParameter_TypeNotSupported(name, parameterType.FullName)); } this.name = name; this.type = parameterType; } ///. /// Name of parameter. public string Name { get { return this.name; } } ///Type of parameter values. public ResourceType ParameterType { get { return this.type; } } ////// PlaceHolder to hold custom state information about service operation parameter. /// public object CustomState { get; set; } ////// Returns true, if this parameter has been set to read only. Otherwise returns false. /// public bool IsReadOnly { get { return this.isReadOnly; } } ////// Sets this service operation parameter to readonly. /// public void SetReadOnly() { if (this.isReadOnly) { return; } this.isReadOnly = true; } } } // 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
- Table.cs
- SystemColors.cs
- PeerEndPoint.cs
- DecimalAverageAggregationOperator.cs
- X509Certificate.cs
- AlphaSortedEnumConverter.cs
- OleDbConnectionInternal.cs
- AxImporter.cs
- TextCollapsingProperties.cs
- Size.cs
- FileAuthorizationModule.cs
- DynamicValidatorEventArgs.cs
- MsmqUri.cs
- StylusPlugInCollection.cs
- CharacterMetrics.cs
- ExpressionHelper.cs
- Clipboard.cs
- HtmlInputFile.cs
- ImageFormat.cs
- SpellerError.cs
- LayoutExceptionEventArgs.cs
- Helpers.cs
- SymLanguageType.cs
- OdbcEnvironment.cs
- SoapTypeAttribute.cs
- HTMLTextWriter.cs
- ListViewSelectEventArgs.cs
- DefaultEventAttribute.cs
- LinqDataView.cs
- CodeParameterDeclarationExpression.cs
- DataException.cs
- Predicate.cs
- Material.cs
- IImplicitResourceProvider.cs
- HtmlInputFile.cs
- ImageKeyConverter.cs
- DetailsViewUpdateEventArgs.cs
- Splitter.cs
- WebBrowserHelper.cs
- Crc32.cs
- ValidationErrorCollection.cs
- FileIOPermission.cs
- JsonQNameDataContract.cs
- XmlWriter.cs
- RegexRunner.cs
- DeferredSelectedIndexReference.cs
- SerializationInfoEnumerator.cs
- ProtocolImporter.cs
- Variable.cs
- Cursor.cs
- BuilderElements.cs
- SapiRecoInterop.cs
- StructuralObject.cs
- BitmapImage.cs
- Errors.cs
- Win32.cs
- BounceEase.cs
- LocalValueEnumerator.cs
- ThreadExceptionDialog.cs
- CompModSwitches.cs
- SecurityElement.cs
- GetLedgerRequest.cs
- ShaderEffect.cs
- WorkflowInstanceQuery.cs
- DataGridColumn.cs
- ObjectConverter.cs
- InstanceStore.cs
- WebScriptEnablingElement.cs
- ObjectDataSourceEventArgs.cs
- LayoutEvent.cs
- VirtualDirectoryMappingCollection.cs
- ConnectionPoint.cs
- WebHttpSecurityModeHelper.cs
- UriSection.cs
- ForwardPositionQuery.cs
- FreezableOperations.cs
- ExpressionParser.cs
- DoubleLink.cs
- NullReferenceException.cs
- PermissionRequestEvidence.cs
- TextUtf8RawTextWriter.cs
- PeerReferralPolicy.cs
- UserControlDocumentDesigner.cs
- AesManaged.cs
- TypeDescriptor.cs
- MessageHeaderInfoTraceRecord.cs
- DropAnimation.xaml.cs
- UnSafeCharBuffer.cs
- UIElement3DAutomationPeer.cs
- Point.cs
- XPathSelfQuery.cs
- DataBinding.cs
- AssemblyBuilderData.cs
- SettingsAttributes.cs
- Timer.cs
- BitmapSource.cs
- MatrixStack.cs
- ImageClickEventArgs.cs
- HtmlHead.cs
- WindowVisualStateTracker.cs