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

C# IProvider类代码示例

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

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



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

示例1: GetStream

        public MediaContainer GetStream(IProvider prov)
        {
            if (MediaContainer.Childrens.Count > 0 && MediaContainer.Childrens[0].Type == "movie")
            {
                MediaContainer.ViewGroup = null;
                MediaContainer.ViewMode = null;
            }
            bool removeandroid = false;

            if (WebOperationContext.Current != null &&
                WebOperationContext.Current.IncomingRequest.Headers.AllKeys.Contains("X-Plex-Product"))
            {
                //Fix for android hang, if the type is populated
                string kh = WebOperationContext.Current.IncomingRequest.Headers.Get("X-Plex-Product").ToUpper();
                if (kh.Contains("ANDROID"))
                    removeandroid = true;
            }
            MediaContainer.Childrens.ForEach(a =>
            {
                a.Group = null;
                if (removeandroid)
                    a.Type = null;
            });
            return MediaContainer;
        }
开发者ID:ElementalCrisis,项目名称:jmmserver,代码行数:25,代码来源:BaseObject.cs


示例2: Layer

        public Layer(string name, string title, IGridSet gridset,IProvider provider, ICache cache = null, ITileFilter cacheFilter = null)
        {
            // Set name
            if (string.IsNullOrEmpty(name))
                throw new ArgumentNullException("Layer Name cannot be null");
            this._name = name;

            // Set title
            this._title = title;

            // Set GridSet
            if (gridset == null)
                throw new ArgumentNullException("Layer GridSet cannot be null");
            this._gridSet = gridset;

            // Set Cache
            this._cache = cache;

            // Set Provider
            if (provider == null)
                throw new ArgumentNullException("Layer Provider cannot be null");
            this._provider = provider;

            this._cacheFitler = cacheFilter;
        }
开发者ID:jbrwn,项目名称:tc,代码行数:25,代码来源:Layer.cs


示例3: UnitOfWork

 public UnitOfWork(IProvider dataProvider)
 {
     provider = dataProvider as Provider;
     if (provider == null)
         throw new Exception("Invalid Data Provider");
     transaction = provider.Session.BeginTransaction();
 }
开发者ID:SpectralAngel,项目名称:Antem,代码行数:7,代码来源:UnitOfWork.cs


示例4: ProviderNode

 public ProviderNode(IProvider provider)
 {
   this.provider = provider;
   this.Text = provider.Name;
   this.ToolTipText = string.Format("{0}{1}{2}", provider.Title, Environment.NewLine, provider.URL);
   this.UpdateStatus();
 }
开发者ID:smther,项目名称:FreeOQ,代码行数:7,代码来源:ProviderNode.cs


示例5: Provider

        static Provider()
        {
            lock (typeof (Provider)) {
                if (provider != null) {
                    return;
                }

                var extensions = GetOrderedExtensions (
                    "/Banshee/Platform/IOProvider",
                    ProviderConfiguration.ProviderSchema.Get (),
                    "Banshee.IO.Gio.Provider", "Banshee.IO.Unix.Provider", "Banshee.IO.SystemIO.Provider"
                );

                foreach (var node in extensions) {
                    try {
                        provider = (IProvider)node.CreateInstance (typeof (IProvider));
                        break;
                    } catch (Exception e) {
                        Log.Warning ("IO provider extension failed to load", e.Message);
                    }
                }

                if (provider == null) {
                    provider = new Banshee.IO.SystemIO.Provider ();
                }

                Log.DebugFormat ("IO provider extension loaded ({0})", provider.GetType ().FullName);

                directory = (IDirectory)Activator.CreateInstance (provider.DirectoryProvider);
                file = (IFile)Activator.CreateInstance (provider.FileProvider);
            }
        }
开发者ID:kelsieflynn,项目名称:banshee,代码行数:32,代码来源:Provider.cs


示例6: Execute

		public IExecuteResult Execute(IProvider provider, object[] parentArgs, object[] userArgs)
		{
			if(parentArgs == null && !(this.parameters == null || this.parameters.Count == 0))
			{
				throw Error.ArgumentNull("arguments");
			}

			// construct new copy of query info
			List<SqlParameterInfo> spis = new List<SqlParameterInfo>(this.queryInfo.Parameters);

			// add call arguments
			for(int i = 0, n = this.parameters.Count; i < n; i++)
			{
				spis.Add(new SqlParameterInfo(this.parameters[i], parentArgs[i]));
			}

			QueryInfo qi = new QueryInfo(
				this.queryInfo.Query,
				this.queryInfo.CommandText,
				spis.AsReadOnly(),
				this.queryInfo.ResultShape,
				this.queryInfo.ResultType
				);

			// execute query
			return provider.Execute(null, qi, this.factory, parentArgs, userArgs, subQueries, null);
		}
开发者ID:modulexcite,项目名称:LinqToSQL2,代码行数:27,代码来源:CompiledSubQuery.cs


示例7: constructControl

    private HtmlGenericControl constructControl(IProvider provider)
    {
        string iconPath = Utility.GetSocialAuthConfiguration().IconFolder.Path ;
        if (string.IsNullOrEmpty(iconPath))
            iconPath = "images/socialauthicons/";
        iconPath += provider.ProviderType.ToString() + ".png";
        bool isconnected = SocialAuthUser.IsConnectedWith(provider.ProviderType);
        bool iscurrent = (SocialAuthUser.CurrentProvider == provider.ProviderType);
        HtmlGenericControl providerDiv = new HtmlGenericControl("div");
        providerDiv.Attributes.Add("class", "provider");
        ImageButton imgB = new ImageButton()
        {
            ID = "img" + provider.ProviderType,
            CommandArgument = provider.ProviderType.ToString(),
            ImageUrl = iconPath
        };
        if (isconnected)
        {
            HtmlGenericControl tickspan = new HtmlGenericControl("span");
            tickspan.InnerHtml = "<img src='images/socialauthicons/" + (iscurrent ? "currentyes" : "yes") + ".png' style='top:0px;left:0px;z-index:100'/>";
            tickspan.Style.Add("position", "absolute");

            providerDiv.Controls.Add(tickspan);
        }
        //if (iscurrent)
        //    imgB.Style.Add("border", "1px solid yellow");
        imgB.Command += new CommandEventHandler(imgB_Command);
        providerDiv.Controls.Add(imgB);
        return providerDiv;
    }
开发者ID:tamilstreetboy,项目名称:socialauth-net,代码行数:30,代码来源:SocialAuthLogin.ascx.cs


示例8: Register

        public static bool Register(IProvider provider)
        {
            bool retval = false;
            if (provider != null)
            {
                object o = null;
                if (provider.GetItem(typeof(IUserDao), out o))
                {
                    _userDao = o as IUserDao;
                    retval = true;
                }

                if (provider.GetItem(typeof(IQueueDao), out o))
                {
                    _queueDao = o as IQueueDao;
                    retval = true;
                }

                if (!retval)
                {
                    Trace.WriteLine("AdminRegistry.Register(" + provider + "): no daos found");
                }
            }
            else
            {
                Trace.WriteLine("QuestionaireRegistry.Register(" + provider + "): provider was null");
            }
            return retval;
        }
开发者ID:amalapannuru,项目名称:RFC,代码行数:29,代码来源:AdminRegistry.cs


示例9: Connect

		public void Connect(IProvider provider)
		{
			if (provider.IsConnected)
				return;
			if (this.useMessageLoop)
			{
				this.form.BeginInvoke((Action)(() => provider.Connect()));
				if ((int)provider.Id == 1 || (int)provider.Id == 2)
				{
					ProviderManager.WaitConnected(provider, (int)this.ConnectionTimeout.TotalMilliseconds);
				}
				else
				{
					ProviderHelperForm f = new ProviderHelperForm();
					f.Init(provider, (int)this.ConnectionTimeout.TotalSeconds);
					MethodInvoker methodInvoker = (MethodInvoker)(() =>
					{
						int temp_75 = (int)f.ShowDialog((IWin32Window)this.parentForm);
						f.Dispose();
					});
					if (this.parentForm.InvokeRequired)
						this.parentForm.Invoke((Delegate)methodInvoker);
					else
						methodInvoker();
				}
			}
			else
				provider.Connect((int)this.ConnectionTimeout.TotalMilliseconds);
		}
开发者ID:smther,项目名称:FreeOQ,代码行数:29,代码来源:ProviderHelper.cs


示例10: ConnectionManager

 internal ConnectionManager(IProvider provider, DbConnection con, int maxUsers, bool disposeConnection) {
     this.provider = provider;
     this.connection = con;
     this.maxUsers = maxUsers;
     this.users = new List<IConnectionUser>(maxUsers);
     this.disposeConnection = disposeConnection;
 }
开发者ID:modulexcite,项目名称:LinqToSQL2,代码行数:7,代码来源:ConnectionManager.cs


示例11: EventMonitorWindow

 public EventMonitorWindow()
 {
     this.InitializeComponent();
     this.counter = new TotalCounter();
     this.providerCounterRows = new Dictionary<IProvider, ProviderCounterViewRow>();
     this.instrumentCounterRows = new Dictionary<IFIXInstrument, InstrumentCounterViewRow>();
     this.selectedProvider = (IProvider)null;
 }
开发者ID:smther,项目名称:FreeOQ,代码行数:8,代码来源:EventMonitorWindow.cs


示例12: CreateCountryLayer

 public static Layer CreateCountryLayer(IProvider countrySource)
 {
     var countries = new Layer("Countries");
     countries.DataSource = countrySource;
     countries.DataSource.SRID = 3785;
     countries.Styles.Add(CreateCountryTheme());
     return countries;
 }
开发者ID:HackatonArGP,项目名称:Guardianes,代码行数:8,代码来源:ShapefileSample.cs


示例13: Subscribe

        public override bool Subscribe(IProvider provider, Hashtable parameterMap)
#endif
 {
			bool success = base.Subscribe(provider, parameterMap);
			if (success)
				FireProviderConnectionEvent(provider, PipeConnectionEvent.PROVIDER_CONNECT_PUSH, parameterMap);
			return success;
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:8,代码来源:InMemoryPushPushPipe.cs


示例14: ToSql

 public IEnumerable<string> ToSql(IProvider provider, IRuntimeContext context)
 {
     return provider.AlterColumn(Parent.Parent.TableName, new Column(
         Parent.ColumnName,
         new DataType(_type, Size, Scale),
         _isNullable,
         DefaultValue));
 }
开发者ID:nachojammers,项目名称:MigSharp,代码行数:8,代码来源:AlterColumnDefinitionCommand.cs


示例15: SqlConnectionManager

 internal SqlConnectionManager(IProvider provider, DbConnection con, int maxUsers, bool disposeConnection) {
     this.provider = provider;
     this.connection = con;
     this.maxUsers = maxUsers;
     this.infoMessagehandler = new SqlInfoMessageEventHandler(this.OnInfoMessage);
     this.users = new List<IConnectionUser>(maxUsers);
     this.disposeConnection = disposeConnection;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:SqlConnectionManager.cs


示例16: ProviderInfo

        public ProviderInfo(IProvider provider, IProviderMetadata metadata)
        {
            if (provider == null) throw new ArgumentNullException("provider");
            if (metadata == null) throw new ArgumentNullException("metadata");

            Provider = provider;
            Metadata = metadata;
        }
开发者ID:dradovic,项目名称:MigSharp,代码行数:8,代码来源:ProviderInfo.cs


示例17: Add

        public void Add(IProvider provider)
        {
            provider.CreateThread = false;
            provider.Disposed += provider_Disposed;

            lock (_providers)
                _providers.Add(provider);
        }
开发者ID:andyvand,项目名称:ProcessHacker,代码行数:8,代码来源:SharedThreadProvider.cs


示例18: HeatLayer

 /// <summary>
 /// Creates an instance of this class
 /// </summary>
 /// <param name="provider">The provider</param>
 /// <param name="heatValueColumn">The name of the column that contains the heat value</param>
 /// <param name="heatValueScale">A value that is responsible to scale the heat value to the range &#x211d;[0, 1f]</param>
 public HeatLayer(IProvider provider, string heatValueColumn, float heatValueScale = 1f)
     : this()
 {
     DataSource = provider;
     HeatValueComputer = GetHeatValueFromColumn;
     HeatValueColumn = heatValueColumn;
     HeatValueScale = heatValueScale;
 }
开发者ID:junglewithyou,项目名称:SharpMap,代码行数:14,代码来源:HeatLayer.cs


示例19: Connector

 /// <summary>
 /// Construcor, initializes the Connector object.
 /// </summary>
 internal Connector(IProvider provider, bool Shared)
 {
     Provider = provider;
     _Shared = Shared;
     Pooled = true;
     InstanceCounter++;
     InstanceNumber = InstanceCounter;
 }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:11,代码来源:Connector.cs


示例20: ProviderProxy

 public ProviderProxy(IProvider provider)
 {
     if (provider == null)
     {
         throw new ArgumentNullException("provider");
     }
     _provider = provider;
 }
开发者ID:geobabbler,项目名称:SharpMap,代码行数:8,代码来源:ProviderProxy.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IProviderConfiguration类代码示例发布时间:2022-05-24
下一篇:
C# IProtocolMessage类代码示例发布时间: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