Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Data / System / Data / SqlClient / SqlClientPermission.cs / 1 / SqlClientPermission.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data.SqlClient { using System.Collections; using System.Data.Common; using System.Runtime.Serialization; using System.Security; using System.Security.Permissions; [Serializable] #if WINFSInternalOnly internal #else public #endif sealed class SqlClientPermission : DBDataPermission { [ Obsolete("SqlClientPermission() has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202", true) ] // MDAC 86034 public SqlClientPermission() : this(PermissionState.None) { } public SqlClientPermission(PermissionState state) : base(state) { } [ Obsolete("SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202", true) ] // MDAC 86034 public SqlClientPermission(PermissionState state, bool allowBlankPassword) : this(state) { AllowBlankPassword = allowBlankPassword; } private SqlClientPermission(SqlClientPermission permission) : base(permission) { // for Copy } internal SqlClientPermission(SqlClientPermissionAttribute permissionAttribute) : base(permissionAttribute) { // for CreatePermission } internal SqlClientPermission(SqlConnectionString constr) : base(constr) { // for Open if ((null == constr) || constr.IsEmpty) { base.Add(ADP.StrEmpty, ADP.StrEmpty, KeyRestrictionBehavior.AllowOnly); } } public override void Add(string connectionString, string restrictions, KeyRestrictionBehavior behavior) { DBConnectionString constr = new DBConnectionString(connectionString, restrictions, behavior, SqlConnectionString.GetParseSynonyms(), false); AddPermissionEntry(constr); } override public IPermission Copy () { return new SqlClientPermission(this); } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false )] [Serializable] #if WINFSInternalOnly internal #else public #endif sealed class SqlClientPermissionAttribute : DBDataPermissionAttribute { public SqlClientPermissionAttribute(SecurityAction action) : base(action) { } override public IPermission CreatePermission() { return new SqlClientPermission(this); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ThreadAttributes.cs
- StateDesigner.CommentLayoutGlyph.cs
- XmlSignificantWhitespace.cs
- CqlParser.cs
- BindingCollection.cs
- WsatRegistrationHeader.cs
- SqlDataSourceFilteringEventArgs.cs
- EpmTargetTree.cs
- TypeGeneratedEventArgs.cs
- IssuedTokenClientBehaviorsElement.cs
- IndexObject.cs
- Rss20FeedFormatter.cs
- CharacterHit.cs
- SiteMapNodeItemEventArgs.cs
- PostBackOptions.cs
- SlipBehavior.cs
- CachedPathData.cs
- PageContentCollection.cs
- LinearQuaternionKeyFrame.cs
- XmlIlVisitor.cs
- InstanceOwnerException.cs
- ContextProperty.cs
- CssTextWriter.cs
- BitmapCodecInfo.cs
- MessageQueueException.cs
- MappingSource.cs
- XmlEntity.cs
- SafeUserTokenHandle.cs
- formatter.cs
- WinCategoryAttribute.cs
- ExternalFile.cs
- NestedContainer.cs
- WebPartCloseVerb.cs
- ColumnMapTranslator.cs
- ActiveXHelper.cs
- _BufferOffsetSize.cs
- GPRECT.cs
- ColumnMapVisitor.cs
- activationcontext.cs
- CodeVariableReferenceExpression.cs
- CompatibleIComparer.cs
- CodeIdentifier.cs
- UIElementCollection.cs
- RequestBringIntoViewEventArgs.cs
- LinqDataSourceDisposeEventArgs.cs
- HelpFileFileNameEditor.cs
- CacheAxisQuery.cs
- QuotedPairReader.cs
- ConsumerConnectionPointCollection.cs
- WindowManager.cs
- ConstructorExpr.cs
- XmlSchemaParticle.cs
- ControlPaint.cs
- Win32SafeHandles.cs
- SerializationFieldInfo.cs
- SystemUdpStatistics.cs
- FileIOPermission.cs
- CategoryValueConverter.cs
- DefaultBinder.cs
- XmlCharCheckingReader.cs
- FileVersionInfo.cs
- BinaryHeap.cs
- StrongNameMembershipCondition.cs
- DataGridViewCheckBoxCell.cs
- ConfigViewGenerator.cs
- SecureStringHasher.cs
- IconBitmapDecoder.cs
- CapabilitiesUse.cs
- Internal.cs
- ColumnCollection.cs
- FollowerQueueCreator.cs
- XmlTextReader.cs
- SQLMoneyStorage.cs
- Selection.cs
- XmlDictionaryReaderQuotasElement.cs
- MouseEvent.cs
- Int16.cs
- SkinBuilder.cs
- RTLAwareMessageBox.cs
- HttpConfigurationSystem.cs
- SelectedCellsChangedEventArgs.cs
- ToolstripProfessionalRenderer.cs
- DesignerLinkAdapter.cs
- AutomationElement.cs
- ConfigurationValues.cs
- SqlConnectionStringBuilder.cs
- TabControlCancelEvent.cs
- DesignTimeVisibleAttribute.cs
- RectAnimation.cs
- DefaultMemberAttribute.cs
- ElementMarkupObject.cs
- WebServiceData.cs
- OdbcRowUpdatingEvent.cs
- SmiConnection.cs
- RightsManagementEncryptionTransform.cs
- Validator.cs
- SocketElement.cs
- Transform.cs
- ArrayElementGridEntry.cs
- ListComponentEditor.cs