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
- SafeRegistryHandle.cs
- SystemThemeKey.cs
- SuppressMessageAttribute.cs
- ResourceProperty.cs
- Msmq.cs
- Pair.cs
- DefaultMemberAttribute.cs
- WebRequestModulesSection.cs
- PartManifestEntry.cs
- VectorAnimationBase.cs
- MTConfigUtil.cs
- isolationinterop.cs
- RemoteArgument.cs
- Compiler.cs
- BindingCollection.cs
- SystemBrushes.cs
- _LocalDataStoreMgr.cs
- SettingsProviderCollection.cs
- FixUpCollection.cs
- CheckBoxStandardAdapter.cs
- HealthMonitoringSection.cs
- ServiceSecurityAuditBehavior.cs
- WindowsNonControl.cs
- PerCallInstanceContextProvider.cs
- XPathScanner.cs
- MarshalDirectiveException.cs
- ViewCellSlot.cs
- ToolBarPanel.cs
- PackageRelationshipSelector.cs
- NavigationProperty.cs
- IUnknownConstantAttribute.cs
- MailBnfHelper.cs
- SqlBulkCopyColumnMapping.cs
- SqlUnionizer.cs
- SqlBulkCopyColumnMappingCollection.cs
- HTTPNotFoundHandler.cs
- DataRelationCollection.cs
- HeaderedItemsControl.cs
- SaveRecipientRequest.cs
- SqlDataSource.cs
- DES.cs
- StorageBasedPackageProperties.cs
- BitmapScalingModeValidation.cs
- TextSelectionHelper.cs
- InputBinder.cs
- TaskSchedulerException.cs
- ContentElement.cs
- SqlTriggerContext.cs
- Menu.cs
- AssemblyInfo.cs
- GridViewEditEventArgs.cs
- ObjectAnimationBase.cs
- SynchronizedReadOnlyCollection.cs
- SkinBuilder.cs
- EnumerableCollectionView.cs
- LocalizationComments.cs
- LineSegment.cs
- CookieParameter.cs
- DoubleCollectionValueSerializer.cs
- SmiEventSink_Default.cs
- WinInetCache.cs
- XsltLibrary.cs
- CodeTypeDeclarationCollection.cs
- FixedLineResult.cs
- _Semaphore.cs
- DesignObjectWrapper.cs
- Keyboard.cs
- PointLight.cs
- TraceLevelStore.cs
- TemplateKeyConverter.cs
- QuaternionRotation3D.cs
- FieldNameLookup.cs
- SystemIcmpV6Statistics.cs
- PathFigure.cs
- RequestStatusBarUpdateEventArgs.cs
- TextTreePropertyUndoUnit.cs
- WebControl.cs
- GifBitmapEncoder.cs
- EDesignUtil.cs
- ListMarkerSourceInfo.cs
- TemplatePagerField.cs
- SchemaCreator.cs
- Hex.cs
- RowType.cs
- DataControlPagerLinkButton.cs
- OdbcDataReader.cs
- SortQueryOperator.cs
- GraphicsContainer.cs
- GridItemProviderWrapper.cs
- InvokeProviderWrapper.cs
- InvalidFilterCriteriaException.cs
- OracleDataAdapter.cs
- DefaultPrintController.cs
- AppDomainUnloadedException.cs
- TcpAppDomainProtocolHandler.cs
- ConfigsHelper.cs
- PointF.cs
- WebPartVerbCollection.cs
- GridLength.cs
- MediaContextNotificationWindow.cs