本文整理汇总了C#中System.Configuration.Provider.ProviderBase类的典型用法代码示例。如果您正苦于以下问题:C# ProviderBase类的具体用法?C# ProviderBase怎么用?C# ProviderBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProviderBase类属于System.Configuration.Provider命名空间,在下文中一共展示了ProviderBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Add
// adds a viewstate provider to a collection of providers.
public override void Add(ProviderBase provider)
{
if (provider != null && provider is ViewStateProviderBase)
{
base.Add(provider);
}
}
示例2: Add
public override void Add (ProviderBase provider)
{
if (provider is RoleProvider)
base.Add (provider);
else
throw new HttpException ();
}
示例3: Add
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("provider");
if (!(provider is DirectoryNumberAnalysorProvider))
throw new ArgumentException("Invalid provider type", "provider");
base.Add(provider);
}
示例4: Add
/// <summary>
/// Adds a provider to the collection.
/// </summary>
/// <param name="provider">The provider to be added.</param>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="provider"/> is null.</exception>
/// <exception cref="T:System.ArgumentException">The <see cref="P:System.Configuration.Provider.ProviderBase.Name"/> of <paramref name="provider"/> is null.- or -The length of the <see cref="P:System.Configuration.Provider.ProviderBase.Name"/> of <paramref name="provider"/> is less than 1.</exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence"/>
/// </PermissionSet>
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("provider");
if (!(provider is OAuthServiceBase))
throw new ArgumentException("Provider must implement OAuthServiceBase.");
base.Add(provider);
}
示例5: Add
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("provider");
if (!(provider is CallLogsProvider))
throw new ArgumentException("Invalid provider type", "provider");
base.Add(provider);
}
示例6: Add
public override void Add (ProviderBase provider)
{
if (!(provider is SettingsProvider))
throw new ArgumentException ("SettingsProvider is expected");
if (String.IsNullOrEmpty (provider.Name))
throw new ArgumentException ("Provider name cannot be null or empty");
base.Add (provider);
}
示例7: Add
/// <summary>
/// Adds a provider to the collection.
/// </summary>
/// <param name="provider">The provider to be added.</param>
/// <exception cref="T:System.NotSupportedException">
/// The collection is read-only.
/// </exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="provider"/> is null.
/// </exception>
/// <exception cref="T:System.ArgumentException">
/// The <see cref="P:System.Configuration.Provider.ProviderBase.Name"/> of <paramref name="provider"/> is null.
/// - or -
/// The length of the <see cref="P:System.Configuration.Provider.ProviderBase.Name"/> of <paramref name="provider"/> is less than 1.
/// </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence"/>
/// </PermissionSet>
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("provider");
if (!(provider is ICacheProvider))
throw new ArgumentException("Provider must implement ICacheProvider.");
base.Add(provider);
}
示例8: Add
public override void Add(ProviderBase provider)
{
if (!(provider is LogProviderBase))
{
throw new ArgumentException("the provider is not log provider.");
}
base.Add(provider);
}
示例9: Add
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("provider");
if (provider is CommunityPathProvider == false)
throw new ArgumentException("Invalid provider type.", "provider");
base.Add(provider);
}
示例10: Add
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("provider");
//if (!(provider is DataSourceProvider))
// throw new ArgumentException("Invalid provider type", "provider");
base.Add(provider);
}
示例11: Add
/// <summary>
/// 向集合中添加提供程序。
/// </summary>
/// <param name="provider">要添加的提供程序。</param>
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("provider is not null");
if (!(provider is LoggingProvider))
throw new ArgumentException("provider must LoggingProvider.");
base.Add(provider);
}
示例12: Add
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("The provider parameter cannot be null.");
if (!(provider is GCheckoutNotificationHandlerProvider))
throw new ArgumentException("The provider parameter must be of type GCheckoutNotificationHandlerProvider.");
base.Add(provider);
}
示例13: Add
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("provider");
if (!(provider is WebFormsFileRegistrationProvider))
throw new ArgumentException("Invalid provider type", "provider");
base.Add(provider);
}
示例14: Add
/// <summary>
/// Add a DAL provider to the collection.
/// </summary>
/// <param name="provider">DAL provider data.</param>
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("provider");
if (provider is APDalProvider)
base.Add(provider);
else
throw new ArgumentException("provider");
}
示例15: Add
public override void Add(ProviderBase provider)
{
if (provider == null)
throw new ArgumentNullException("The provider parameter cannot be null.");
if (!(provider is PayPalReturnHandlerProvider))
throw new ArgumentException("The provider parameter must be of type PayPalReturnHandlerProvider.");
base.Add(provider);
}