Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- PageAction.cs
- _SslStream.cs
- PowerStatus.cs
- DataGridSortCommandEventArgs.cs
- SecurityTimestamp.cs
- Buffer.cs
- Win32KeyboardDevice.cs
- ProcessHostMapPath.cs
- RegexCode.cs
- FontWeight.cs
- Metadata.cs
- OpCopier.cs
- SettingsPropertyValue.cs
- AttachedPropertyMethodSelector.cs
- DataBoundControlHelper.cs
- LineServices.cs
- SessionPageStateSection.cs
- COM2ExtendedBrowsingHandler.cs
- MDIClient.cs
- BinaryFormatterWriter.cs
- DbConnectionOptions.cs
- KeyedCollection.cs
- MemberInfoSerializationHolder.cs
- InstanceHandleConflictException.cs
- BreakRecordTable.cs
- HTTPNotFoundHandler.cs
- Scanner.cs
- ExpressionBinding.cs
- BatchParser.cs
- RpcCryptoRequest.cs
- PreviewKeyDownEventArgs.cs
- HostedTransportConfigurationManager.cs
- DesignerHelpers.cs
- UInt32.cs
- IPipelineRuntime.cs
- PathSegmentCollection.cs
- IsolatedStoragePermission.cs
- ZoneButton.cs
- LayoutEditorPart.cs
- DataProtection.cs
- SetterBaseCollection.cs
- CompiledQueryCacheEntry.cs
- DeviceSpecificChoice.cs
- EndpointDiscoveryBehavior.cs
- ControlBuilder.cs
- CodeGroup.cs
- Tuple.cs
- FlowLayoutPanel.cs
- CacheHelper.cs
- SimpleApplicationHost.cs
- BookmarkTable.cs
- SQlBooleanStorage.cs
- DispatcherProcessingDisabled.cs
- PasswordBoxAutomationPeer.cs
- _PooledStream.cs
- SymbolEqualComparer.cs
- HttpDigestClientCredential.cs
- DataRelationCollection.cs
- SystemIPGlobalStatistics.cs
- TracePayload.cs
- WebPartZone.cs
- HtmlFormWrapper.cs
- SqlDataSourceCommandEventArgs.cs
- SqlNotificationRequest.cs
- PropertyOrder.cs
- FontSourceCollection.cs
- XMLSchema.cs
- TextDecoration.cs
- SingleAnimation.cs
- SqlDataReader.cs
- XmlLoader.cs
- SystemWebExtensionsSectionGroup.cs
- XmlCDATASection.cs
- CompiledXpathExpr.cs
- RawMouseInputReport.cs
- WriteableOnDemandPackagePart.cs
- NodeInfo.cs
- FormCollection.cs
- QuinticEase.cs
- WebBrowserNavigatedEventHandler.cs
- ObjectSpanRewriter.cs
- RewritingProcessor.cs
- OdbcHandle.cs
- UriTemplatePathSegment.cs
- DataGridViewCellStyleChangedEventArgs.cs
- AxisAngleRotation3D.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- IIS7UserPrincipal.cs
- EntityDataSourceView.cs
- SymDocumentType.cs
- ToolboxDataAttribute.cs
- HandlerWithFactory.cs
- Exceptions.cs
- DbReferenceCollection.cs
- CleanUpVirtualizedItemEventArgs.cs
- PersianCalendar.cs
- Dispatcher.cs
- ConfigXmlText.cs
- TextTrailingCharacterEllipsis.cs
- SystemColors.cs