Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Data / System / Data / Sql / SqlNotificationRequest.cs / 1 / SqlNotificationRequest.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
// [....]
//-----------------------------------------------------------------------------
namespace System.Data.Sql {
using System;
using System.Data.Common;
using System.Data.SqlClient;
// [System.ComponentModel.TypeConverterAttribute(typeof(System.Data.Sql.SqlNotificationRequest.SqlNotificationRequestConverter))]
#if WINFSInternalOnly
internal
#else
public
#endif
sealed class SqlNotificationRequest {
private string _userData;
private string _options;
private int _timeout;
public SqlNotificationRequest()
: this(null, null, SqlClient.SQL.SqlDependencyTimeoutDefault) {}
public SqlNotificationRequest(string userData, string options, int timeout) {
UserData = userData;
Timeout = timeout;
Options = options;
}
public string Options {
get {
return _options;
}
set {
if ((null != value) && (UInt16.MaxValue < value.Length)) {
throw ADP.ArgumentOutOfRange(String.Empty, ADP.ParameterService);
}
_options = value;
}
}
public int Timeout {
get {
return _timeout;
}
set {
if (0 > value) {
throw ADP.ArgumentOutOfRange(String.Empty, ADP.ParameterTimeout);
}
_timeout = value;
}
}
public string UserData {
get {
return _userData;
}
set {
if ((null != value) && (UInt16.MaxValue < value.Length)) {
throw ADP.ArgumentOutOfRange(String.Empty, ADP.ParameterUserData);
}
_userData = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
// [....]
//-----------------------------------------------------------------------------
namespace System.Data.Sql {
using System;
using System.Data.Common;
using System.Data.SqlClient;
// [System.ComponentModel.TypeConverterAttribute(typeof(System.Data.Sql.SqlNotificationRequest.SqlNotificationRequestConverter))]
#if WINFSInternalOnly
internal
#else
public
#endif
sealed class SqlNotificationRequest {
private string _userData;
private string _options;
private int _timeout;
public SqlNotificationRequest()
: this(null, null, SqlClient.SQL.SqlDependencyTimeoutDefault) {}
public SqlNotificationRequest(string userData, string options, int timeout) {
UserData = userData;
Timeout = timeout;
Options = options;
}
public string Options {
get {
return _options;
}
set {
if ((null != value) && (UInt16.MaxValue < value.Length)) {
throw ADP.ArgumentOutOfRange(String.Empty, ADP.ParameterService);
}
_options = value;
}
}
public int Timeout {
get {
return _timeout;
}
set {
if (0 > value) {
throw ADP.ArgumentOutOfRange(String.Empty, ADP.ParameterTimeout);
}
_timeout = value;
}
}
public string UserData {
get {
return _userData;
}
set {
if ((null != value) && (UInt16.MaxValue < value.Length)) {
throw ADP.ArgumentOutOfRange(String.Empty, ADP.ParameterUserData);
}
_userData = value;
}
}
}
}
// 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
- CommandEventArgs.cs
- DayRenderEvent.cs
- SqlBinder.cs
- EntryIndex.cs
- BindingMAnagerBase.cs
- _ListenerRequestStream.cs
- EqualityArray.cs
- WorkflowRuntime.cs
- GetMemberBinder.cs
- ConnectionStringSettingsCollection.cs
- FileClassifier.cs
- StopStoryboard.cs
- CqlGenerator.cs
- StringStorage.cs
- ProgressBar.cs
- MeasurementDCInfo.cs
- HtmlShimManager.cs
- CapiHashAlgorithm.cs
- DesignerToolStripControlHost.cs
- DictionaryTraceRecord.cs
- DataSvcMapFileSerializer.cs
- Viewport2DVisual3D.cs
- CompensationHandlingFilter.cs
- Condition.cs
- BitmapScalingModeValidation.cs
- MatrixUtil.cs
- Roles.cs
- DeviceContext2.cs
- _ScatterGatherBuffers.cs
- StrokeRenderer.cs
- XmlWriterSettings.cs
- ResXResourceWriter.cs
- InkCanvas.cs
- MenuItem.cs
- WebPartRestoreVerb.cs
- ClassicBorderDecorator.cs
- Claim.cs
- FtpRequestCacheValidator.cs
- MemberJoinTreeNode.cs
- MessageDroppedTraceRecord.cs
- XmlParserContext.cs
- BinaryOperationBinder.cs
- ImplicitInputBrush.cs
- Point3DCollectionConverter.cs
- GiveFeedbackEvent.cs
- ExeContext.cs
- HandleCollector.cs
- NamespaceList.cs
- DataChangedEventManager.cs
- IProvider.cs
- BitmapFrameEncode.cs
- BrowserDefinitionCollection.cs
- ArrayList.cs
- ListDictionary.cs
- DataGridViewCellCollection.cs
- ProgressBar.cs
- ExecutionEngineException.cs
- ElementInit.cs
- RowToParametersTransformer.cs
- MouseActionConverter.cs
- Size3DValueSerializer.cs
- SecurityState.cs
- XmlEnumAttribute.cs
- VariableQuery.cs
- ServiceOperation.cs
- JsonEnumDataContract.cs
- OdbcConnection.cs
- ClientConfigPaths.cs
- dbenumerator.cs
- altserialization.cs
- EntityDataSourceContextDisposingEventArgs.cs
- PersonalizationEntry.cs
- ObjectTag.cs
- TimeSpan.cs
- StateChangeEvent.cs
- NetCodeGroup.cs
- CodeNamespaceImportCollection.cs
- SqlDataSourceView.cs
- LoginViewDesigner.cs
- processwaithandle.cs
- TrackingProfileManager.cs
- AsyncOperationLifetimeManager.cs
- WebControlToolBoxItem.cs
- ObjectDataSourceMethodEditor.cs
- ActivityDesignerLayoutSerializers.cs
- SessionIDManager.cs
- DataGridColumnFloatingHeader.cs
- DataGridDesigner.cs
- PTConverter.cs
- HtmlButton.cs
- SocketPermission.cs
- CollectionBuilder.cs
- LoginView.cs
- DependencyPropertyValueSerializer.cs
- FigureParaClient.cs
- ResourceType.cs
- PageParserFilter.cs
- Timeline.cs
- StringValidatorAttribute.cs
- Setter.cs