Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / SqlClient / SqlClientPermission.cs / 1305376 / 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] public 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] public 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. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data.SqlClient { using System.Collections; using System.Data.Common; using System.Runtime.Serialization; using System.Security; using System.Security.Permissions; [Serializable] public 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] public 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ControlCollection.cs
- ConstraintEnumerator.cs
- CollectionViewGroup.cs
- ListControl.cs
- HandleValueEditor.cs
- ConfigurationPropertyCollection.cs
- TrustLevel.cs
- KnownTypeHelper.cs
- SerializationAttributes.cs
- CommandHelpers.cs
- MsmqInputChannel.cs
- Table.cs
- DataGridViewImageColumn.cs
- SiteMapDataSource.cs
- FixedSOMSemanticBox.cs
- FontStretches.cs
- RankException.cs
- LZCodec.cs
- FlowLayout.cs
- IgnoreSectionHandler.cs
- UserMapPath.cs
- Memoizer.cs
- DesignerObjectListAdapter.cs
- LocalizableAttribute.cs
- Point4DConverter.cs
- MouseDevice.cs
- VScrollProperties.cs
- FontUnitConverter.cs
- TouchPoint.cs
- ScriptingAuthenticationServiceSection.cs
- XNameConverter.cs
- PropertyEmitter.cs
- SafeRightsManagementQueryHandle.cs
- InkCanvasSelectionAdorner.cs
- BoundField.cs
- XmlSchemaComplexContent.cs
- CacheAxisQuery.cs
- SqlRecordBuffer.cs
- PerformanceCounterPermissionEntryCollection.cs
- TreeNodeBinding.cs
- DataGridViewImageCell.cs
- StylusPointPropertyUnit.cs
- ServiceSecurityContext.cs
- ValidatingReaderNodeData.cs
- CqlLexerHelpers.cs
- ScrollItemProviderWrapper.cs
- HttpRuntime.cs
- BamlLocalizationDictionary.cs
- MetadataArtifactLoaderCompositeResource.cs
- MailSettingsSection.cs
- DynamicResourceExtensionConverter.cs
- XmlHierarchyData.cs
- DerivedKeySecurityToken.cs
- ToolStripContentPanelRenderEventArgs.cs
- DoubleLinkList.cs
- EncryptedReference.cs
- ToolStripSeparator.cs
- ToolStripComboBox.cs
- StringDictionaryWithComparer.cs
- TemplateControlParser.cs
- XmlSignificantWhitespace.cs
- AssociatedControlConverter.cs
- X509CertificateRecipientServiceCredential.cs
- SchemaImporterExtensionElementCollection.cs
- WebServiceErrorEvent.cs
- EditingMode.cs
- X509CertificateValidationMode.cs
- DataViewManager.cs
- ToolStripLocationCancelEventArgs.cs
- CodeTypeReferenceExpression.cs
- TextSpanModifier.cs
- QilUnary.cs
- WebConvert.cs
- ListBoxItemWrapperAutomationPeer.cs
- ListViewItem.cs
- SqlClientWrapperSmiStreamChars.cs
- GeneralTransformGroup.cs
- Function.cs
- TextWriterEngine.cs
- ReliableReplySessionChannel.cs
- DataGridViewRowConverter.cs
- ObjectListGeneralPage.cs
- PowerStatus.cs
- WebPartConnectionsConnectVerb.cs
- RelatedPropertyManager.cs
- CustomAttributeSerializer.cs
- Stylesheet.cs
- ScriptDescriptor.cs
- ValueChangedEventManager.cs
- TextEditor.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- ConfigXmlCDataSection.cs
- CodeCompiler.cs
- MimeTypeMapper.cs
- RealizationDrawingContextWalker.cs
- XmlProcessingInstruction.cs
- GrammarBuilderBase.cs
- SystemIPInterfaceProperties.cs
- PluralizationService.cs
- Rect.cs