当前位置: 首页>>代码示例>>C#>>正文


C# IProvider.GetType方法代码示例

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


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

示例1: Provider

		internal Provider(IProvider provider)
		{
			this.provider = provider;
			this.Properties = new ProviderPropertyList();
			PropertyInfo[] properties = provider.GetType().GetProperties();
			for (int i = 0; i < properties.Length; i++)
			{
				PropertyInfo propertyInfo = properties[i];
				if (propertyInfo.CanRead && propertyInfo.CanWrite && (propertyInfo.PropertyType.IsValueType || propertyInfo.PropertyType == typeof(string)))
				{
					this.Properties.Add(new ProviderProperty(propertyInfo, provider));
				}
			}
		}
开发者ID:smther,项目名称:OpenQuant.API,代码行数:14,代码来源:Provider.cs

示例2: getIdentCode

 private String getIdentCode(IProvider provider)
 {
     foreach (KeyValuePair<String, String> kvPair in this.ApplicationSettings.IdentCodes) {
         if (String.Compare(kvPair.Value, provider.GetType().ToString(), true) == 0) {
             return kvPair.Key;
         }
     }
     return null;
 }
开发者ID:RBernhardt,项目名称:unisono,代码行数:9,代码来源:UIProviders.xaml.cs

示例3: Provider

		internal Provider(IProvider provider)
		{
			this.provider = provider;
			this.Properties = new ProviderPropertyList();
			foreach (PropertyInfo property in provider.GetType().GetProperties())
			{
				if (property.CanRead && property.CanWrite && (property.PropertyType.IsValueType || property.PropertyType == typeof(string)))
					this.Properties.Add(new ProviderProperty(property, provider));
			}
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:10,代码来源:Provider.cs

示例4: PrepareDataSourceForCql

 private static void PrepareDataSourceForCql(IProvider provider, string cqlFilterString)
 {
     //for layers with a filterprovider
     var filterProvider = provider as FilterProvider;
     if (filterProvider != null)
     {
         filterProvider.FilterDelegate = row => CqlFilter(row, cqlFilterString);
         return;
     }
     //for layers with a SQL datasource with a DefinitionQuery property
     var piDefinitionQuery = provider.GetType().GetProperty("DefinitionQuery", BindingFlags.Public | BindingFlags.Instance);
     if (piDefinitionQuery != null)
     {
         string dq = piDefinitionQuery.GetValue(provider, null) as string;
         if (string.IsNullOrEmpty(dq))
             piDefinitionQuery.SetValue(provider, cqlFilterString, null);
         else
             piDefinitionQuery.SetValue(provider, "(" + dq + ") AND (" + cqlFilterString + ")", null);
     }
 }
开发者ID:geobabbler,项目名称:SharpMap,代码行数:20,代码来源:LegacyWmsServer.cs

示例5: PrepareDataSourceForCql

 private void PrepareDataSourceForCql(IProvider provider, string cqlFilterString)
 {
     // for layerNames with a filterprovider
     FilterProvider filterProvider = provider as FilterProvider;
     if (filterProvider != null)
     {
         filterProvider.FilterDelegate = row => CqlFilter(row, cqlFilterString);
         return;
     }
     // for layerNames with a SQL datasource with a DefinitionQuery property
     PropertyInfo piDefinitionQuery = provider.GetType().GetProperty("DefinitionQuery", BindingFlags.Public | BindingFlags.Instance);
     if (piDefinitionQuery != null)
         piDefinitionQuery.SetValue(provider, cqlFilterString, null);
 }
开发者ID:geobabbler,项目名称:SharpMap,代码行数:14,代码来源:GetMap.cs

示例6: appendProvider

 private void appendProvider(IProvider newProvider)
 {
     //
     // get available provider
     IProvider currentProvider = null;
     foreach (IProvider provider in this.AvailableProviders) {
         if (String.Compare(newProvider.GetType().ToString(), provider.GetType().ToString()) == 0) {
             currentProvider = provider;
         }
     }
     //
     // remove current provider
     if (currentProvider != null) {
         this.AvailableProviders.Remove(currentProvider);
         // check date of providers
         FileInfo currentFileInfo = new FileInfo(currentProvider.GetType().Assembly.Location);
         FileInfo newFileInfo = new FileInfo(newProvider.GetType().Assembly.Location);
         if (currentFileInfo.CreationTime.CompareTo(newFileInfo.CreationTime) > 0) {
             newProvider = currentProvider;
         }
     }
     //
     newProvider.ApplicationSettings = this.ApplicationSettings;
     newProvider.Settings = this.ApplicationSettings.getNode(new String[] { "providersettings", newProvider.GetType().ToString() });
     //
     // append provider
     this.AvailableProviders.Add(newProvider);
 }
开发者ID:RBernhardt,项目名称:unisono,代码行数:28,代码来源:Providers.cs


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