• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ProviderType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ProviderType的典型用法代码示例。如果您正苦于以下问题:C# ProviderType类的具体用法?C# ProviderType怎么用?C# ProviderType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProviderType类属于命名空间,在下文中一共展示了ProviderType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SqlGrouping

		internal SqlGrouping(Type clrType, ProviderType sqlType, SqlExpression key, SqlExpression group, Expression sourceExpression)
			: base(SqlNodeType.Grouping, clrType, sqlType, sourceExpression) {
			if (key == null) throw Error.ArgumentNull("key");
			if (group == null) throw Error.ArgumentNull("group");
			this.key = key;
			this.group = group;
			}
开发者ID:modulexcite,项目名称:LinqToSQL2,代码行数:7,代码来源:SqlGrouping.cs


示例2: CryptoServiceProviderHash

 internal CryptoServiceProviderHash(
     String provider,
     ProviderType providerType,
     AlgorithmId algorithm)
     : base(provider, providerType, algorithm)
 {
 }
开发者ID:marteaga,项目名称:healthvault-azurestorage,代码行数:7,代码来源:CryptoServiceProviderHash.cs


示例3: LoadFiles

        public virtual ActionResult LoadFiles(int id, ProviderType type)
        {
            var toRet = new List<ImageJson>();
            //to recover files state in case of error
            var filesFromCache = _ObjectStore.Get<PictureDataContainer>(PictureData.GetKey(type));

            if (filesFromCache == null)
            {
                var provider = GetProvider(type, id);
                if (provider == null)
                    return Json(toRet, "text/html");
                filesFromCache = new PictureDataContainer(provider);
            }

            var urlHelper = new UrlHelper(ControllerContext.RequestContext);
            var folder = PictureData.GetFolder(type);
            foreach (var file in filesFromCache.Files)
            {
                var url = ControllerHelpers.GetUserImagePath(file.FileName, true, folder);
                var deleteUrl = urlHelper.Action(MVC.UploadImage.DeleteImage(file.FileName));
                toRet.Add(new ImageJson
                {
                    name = file.FileName,
                    delete_url = deleteUrl,
                    thumbnail_url = url,
                    url = url,
                    is_default = file.IsDefault ? "true" : null,
                    is_logo = file.IsLogo ? "true" : null
                });
            }
            return Json(toRet, "text/html");
        }
开发者ID:tah91,项目名称:eworkyWebSite,代码行数:32,代码来源:UploadImageController.cs


示例4: SqlBinary

		internal SqlBinary(SqlNodeType nt, Type clrType, ProviderType sqlType, SqlExpression left, SqlExpression right, MethodInfo method)
			: base(nt, clrType, sqlType, right.SourceExpression) {
			switch (nt) {
				case SqlNodeType.Add:
				case SqlNodeType.Sub:
				case SqlNodeType.Mul:
				case SqlNodeType.Div:
				case SqlNodeType.Mod:
				case SqlNodeType.BitAnd:
				case SqlNodeType.BitOr:
				case SqlNodeType.BitXor:
				case SqlNodeType.And:
				case SqlNodeType.Or:
				case SqlNodeType.GE:
				case SqlNodeType.GT:
				case SqlNodeType.LE:
				case SqlNodeType.LT:
				case SqlNodeType.EQ:
				case SqlNodeType.NE:
				case SqlNodeType.EQ2V:
				case SqlNodeType.NE2V:
				case SqlNodeType.Concat:
				case SqlNodeType.Coalesce:
					break;
				default:
					throw Error.UnexpectedNode(nt);
			}
			this.Left = left;
			this.Right = right;
			this.method = method;
			}
开发者ID:modulexcite,项目名称:LinqToSQL2,代码行数:31,代码来源:SqlBinary.cs


示例5: SqlUnary

		internal SqlUnary(SqlNodeType nt, Type clrType, ProviderType sqlType, SqlExpression expr, MethodInfo method, Expression sourceExpression)
			: base(nt, clrType, sqlType, sourceExpression) {
			switch (nt) {
				case SqlNodeType.Not:
				case SqlNodeType.Not2V:
				case SqlNodeType.Negate:
				case SqlNodeType.BitNot:
				case SqlNodeType.IsNull:
				case SqlNodeType.IsNotNull:
				case SqlNodeType.Count:
				case SqlNodeType.LongCount:
				case SqlNodeType.Max:
				case SqlNodeType.Min:
				case SqlNodeType.Sum:
				case SqlNodeType.Avg:
				case SqlNodeType.Stddev:
				case SqlNodeType.Convert:
				case SqlNodeType.ValueOf:
				case SqlNodeType.Treat:
				case SqlNodeType.OuterJoinedValue:
				case SqlNodeType.ClrLength:
					break;
				default:
					throw Error.UnexpectedNode(nt);
			}
			this.Operand = expr;
			this.method = method;
			}
开发者ID:modulexcite,项目名称:LinqToSQL2,代码行数:28,代码来源:SqlUnary.cs


示例6: CryptoServiceProviderHmac

 public CryptoServiceProviderHmac(
     String provider,
     ProviderType providerType,
     AlgorithmId algorithm)
     : base(provider, providerType, algorithm)
 {
 }
开发者ID:marteaga,项目名称:healthvault-azurestorage,代码行数:7,代码来源:CryptoServiceProvderHmac.cs


示例7: RegisterProvider

        public void RegisterProvider(ProviderType providerType, string clientID, string clientSecret, string scope = null, NameValueCollection additionalParameters = null)
        {
            Provider provider = null;
            switch (providerType)
            {
                case ProviderType.Google:
                    provider = new GoogleProvider(clientID, clientSecret, scope, additionalParameters);
                    break;
                case ProviderType.Live:
                    provider = new LiveProvider(clientID, clientSecret, scope, additionalParameters);
                    break;
                case ProviderType.Facebook:
                    provider = new FacebookProvider(clientID, clientSecret, scope, additionalParameters);
                    break;
                case ProviderType.LinkedIn:
                    provider = new LinkedInProvider(clientID, clientSecret, scope, additionalParameters);
                    break;
            }

            if (provider == null)
            {
                throw new ArgumentException("Invalid provider type");
            }

            providers[providerType] = provider;
        }
开发者ID:brockallen,项目名称:BrockAllen.OAuth2,代码行数:26,代码来源:OAuth2Client.cs


示例8: BothTypesAreStrings

		private bool BothTypesAreStrings(ProviderType oldSqlType, ProviderType newSqlType)
		{
			bool result = oldSqlType.IsSameTypeFamily(sql.TypeProvider.From(typeof(string)))
				&& newSqlType.IsSameTypeFamily(sql.TypeProvider.From(typeof(string)));

			return result;
		}
开发者ID:modulexcite,项目名称:LinqToSQL2,代码行数:7,代码来源:SqlTypeConverter.cs


示例9: VisitBinaryOperator

		internal override SqlExpression VisitBinaryOperator(SqlBinary bo)
		{
			//
			// Special case to allow DateTime CLR type to be passed as a paramater where
			// a SQL type TIME is expected. We do this only for the equality/inequality
			// comparisons.
			//
			switch(bo.NodeType)
			{
				case SqlNodeType.EQ:
				case SqlNodeType.EQ2V:
				case SqlNodeType.NE:
				case SqlNodeType.NE2V:
				{
					SqlDbType leftSqlDbType = ((SqlType)(bo.Left.SqlType)).SqlDbType;
					SqlDbType rightSqlDbType = ((SqlType)(bo.Right.SqlType)).SqlDbType;
					if(leftSqlDbType == rightSqlDbType)
						break;

					bool isLeftColRef = bo.Left is SqlColumnRef;
					bool isRightColRef = bo.Right is SqlColumnRef;
					if(isLeftColRef == isRightColRef)
						break;

					if(isLeftColRef && leftSqlDbType == SqlDbType.Time && bo.Right.ClrType == typeof(DateTime))
						this.timeProviderType = bo.Left.SqlType;
					else if(isRightColRef && rightSqlDbType == SqlDbType.Time && bo.Left.ClrType == typeof(DateTime))
						this.timeProviderType = bo.Left.SqlType;
					break;
				}
			}
			base.VisitBinaryOperator(bo);
			return bo;
		}
开发者ID:modulexcite,项目名称:LinqToSQL2,代码行数:34,代码来源:SqlParameterInfoProducer.cs


示例10: SqlTable

		internal SqlTable(MetaTable table, MetaType rowType, ProviderType sqlRowType, Expression sourceExpression)
			: base(SqlNodeType.Table, sourceExpression) {
			this.table = table;
			this.rowType = rowType;
			this.sqlRowType = sqlRowType;
			this.columns = new List<SqlColumn>();
			}
开发者ID:modulexcite,项目名称:LinqToSQL2,代码行数:7,代码来源:SqlTable.cs


示例11: castProvider

 /// <summary>
 /// initialization casting for InitializeDataAccess()
 /// </summary>
 /// <param name="type"></param>
 /// <param name="ConnectionString"></param>
 /// <param name="Query"></param>
 private void castProvider(ProviderType type, string ConnectionString, string Query = null)
 {
     switch (type)
     {
         case ProviderType.Oledb:
             conn = new OleDbConnection(ConnectionString);
             cmd = new OleDbCommand(Query, (OleDbConnection)conn);
             da = new OleDbDataAdapter();
             break;
         case ProviderType.Odbc:
             conn = new OdbcConnection(ConnectionString);
             cmd = new OdbcCommand(Query, (OdbcConnection)conn);
             da = new OdbcDataAdapter();
             break;
         case ProviderType.SqlClient:
             conn = new SqlConnection(ConnectionString);
             cmd = new SqlCommand(Query, (SqlConnection)conn);
             da = new SqlDataAdapter();
             break;
         //case ProviderType.OracleClient:
         //    conn = new OracleConnection(ConnectionString);
         //    cmd = new OracleCommand(Query,(OracleConnection)conn);
         //    break;
     }
 }
开发者ID:reciosonny,项目名称:Data-Access-Layer-Centralization-using-ADO.net,代码行数:31,代码来源:DataAccessPrivateMethods.cs


示例12: GetProvider

 public static BaseProvider GetProvider(ProviderType type)
 {
     switch (type)
     {
         case ProviderType.Hulu:
             return new HuluProvider();
         case ProviderType.Instagram:
             return new InstagramProvider();
         case ProviderType.Polleverywhere:
             return new PolleverywhereProvider();
         case ProviderType.Polldaddy:
             return new PolldaddyProvider();
         case ProviderType.Scribd:
             return new ScribdProvider();
         case ProviderType.Slideshare:
             return new SlideshareProvider();
         case ProviderType.Smugmug:
             return new SmugmugProvider();
         case ProviderType.Soundcloud:
             return new SoundcloudProvider();
         case ProviderType.Spotify:
             return new SpotifyProvider();
         case ProviderType.Vimeo:
             return new VimeoProvider();
         case ProviderType.Youtube:
             return new YoutubeProvider();
         default:
             throw new UnknownProviderException();
     }
 }
开发者ID:patrickmjones,项目名称:PJones.OEmbed,代码行数:30,代码来源:ProviderFactory.cs


示例13: LogonUser

 internal static extern int LogonUser(
     string lpszUsername,
     string lpszDomain,
     string lpszPassword,
     LogonType dwLogonType,
     ProviderType dwLogonProvider,
     out IntPtr phToken);
开发者ID:yallie,项目名称:zyan,代码行数:7,代码来源:WindowsSecurityTools.cs


示例14: DbConnector

      public DbConnector(ProviderType _eProviderType, string _strConnectionString) {
         _providerType = _eProviderType;
         _connectionString = _strConnectionString;
         _connected = false;
         _connector = null;

         Open();
      }
开发者ID:borkaborka,项目名称:gmit,代码行数:8,代码来源:DbConnector.cs


示例15: SqlRowNumber

		internal SqlRowNumber(Type clrType, ProviderType sqlType, List<SqlOrderExpression> orderByList, Expression sourceExpression)
			: base(SqlNodeType.RowNumber, clrType, sqlType, sourceExpression) {
			if (orderByList == null) {
				throw Error.ArgumentNull("orderByList");
			}

			this.orderBy = orderByList;
			}
开发者ID:modulexcite,项目名称:LinqToSQL2,代码行数:8,代码来源:SqlRowNumber.cs


示例16: Mapping

 public Mapping(ProviderType providerType, int subscriberId, string name, string description, string domain)
 {
     ProviderId = providerType;
     SubscriberId = subscriberId;
     Name = name;
     Description = description;
     Domain = domain;
 }
开发者ID:c0d3m0nky,项目名称:mty,代码行数:8,代码来源:Mapping.cs


示例17: GetProvider

 internal Provider GetProvider(ProviderType providerType)
 {
     var provider = providers[providerType];
     if (provider == null)
     {
         throw new ArgumentException("Invalid provider type");
     }
     return provider;
 }
开发者ID:brockallen,项目名称:BrockAllen.OAuth2,代码行数:9,代码来源:OAuth2Client.cs


示例18: GetProvidersByType

 public List<Provider> GetProvidersByType(ProviderType providerType, int takeMax)
 {
     using (var connection = DbContextFactory.CreateConnection())
     {
         return connection
             .Query<Provider>("Provider_GetLatestByType", new { ProviderType = providerType.ToString(), Max = takeMax }, commandType: CommandType.StoredProcedure)
             .ToList();
     }
 }
开发者ID:wijayakoon,项目名称:Unixmo,代码行数:9,代码来源:ProviderRepository.cs


示例19: SqlParameter

		internal SqlParameter(Type clrType, ProviderType sqlType, string name, Expression sourceExpression)
			: base(SqlNodeType.Parameter, clrType, sqlType, sourceExpression) {
			if (name == null)
				throw Error.ArgumentNull("name");
			if (typeof(Type).IsAssignableFrom(clrType))
				throw Error.ArgumentWrongValue("clrType");
			this.name = name;
			this.direction = System.Data.ParameterDirection.Input;
			}
开发者ID:modulexcite,项目名称:LinqToSQL2,代码行数:9,代码来源:SqlParameter.cs


示例20: AbstractCryptoServiceProviderHash

 /// <summary>
 /// Initializes a new instance of the 
 /// <see cref="AbstractCryptoServiceProviderHash"/> class.
 /// </summary>
 /// 
 /// <param name="provider">
 /// The name of the Capi provider.
 /// </param>
 /// 
 /// <param name="providerType">
 /// Type of the provider.
 /// </param>
 /// 
 /// <param name="algorithm">
 /// The hash algorithm.
 /// </param>
 internal AbstractCryptoServiceProviderHash(
     String provider, 
     ProviderType providerType, 
     AlgorithmId algorithm)
 {
     this._algorithmId = algorithm;
     this._provider = provider;
     this._providerType = providerType;
 }
开发者ID:marteaga,项目名称:healthvault-azurestorage,代码行数:25,代码来源:AbstractCryptoServiceProviderHash.cs



注:本文中的ProviderType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Province类代码示例发布时间:2022-05-24
下一篇:
C# Provider类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap