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

C# IActivator类代码示例

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

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



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

示例1: Bootstrapper

 public Bootstrapper(IAssemblyLoader assemblyLoader, IModuleLoader moduleLoader, IActivator activator, IModuleImporter moduleImporter)
 {
     this.assemblyLoader = assemblyLoader;
      this.moduleLoader = moduleLoader;
      this.activator = activator;
      this.moduleImporter = moduleImporter;
 }
开发者ID:the-dargon-project,项目名称:ryu,代码行数:7,代码来源:Bootstrapper.cs


示例2: RyuContainer

   public RyuContainer(
    RyuContainer parent, 
    IActivator activator
 )
       : this(parent, activator, new ConcurrentDictionary<Type, RyuType>())
   {
   }
开发者ID:the-dargon-project,项目名称:ryu,代码行数:7,代码来源:RyuContainer.cs


示例3: Create

 // single layer network
 public static NeuralNetwork<Vector> Create(IDataSet<Vector, Vector> dataSet, IActivator activator)
 {
     var workLayer = new FullyConnectedLayer(dataSet.FirstInput.Size, dataSet.FirstOutput.Size, activator);
     var outputLayer = new OutputLayer<Vector>();
     var layers = new CompositeLayer<Vector, Vector, Vector>(workLayer, outputLayer);
     return new NeuralNetwork<Vector>(layers);
 }
开发者ID:pxqr,项目名称:nanon,代码行数:8,代码来源:NetworkBuilder.cs


示例4: AppDomainLevelActivator

 internal AppDomainLevelActivator(SerializationInfo info, StreamingContext context)
 {
     if (info == null)
     {
         throw new ArgumentNullException("info");
     }
     this.m_NextActivator = (IActivator) info.GetValue("m_NextActivator", typeof(IActivator));
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:AppDomainLevelActivator.cs


示例5: DynamicProxyActivator

 public DynamicProxyActivator(IMachineContainer container, IProxyBuilder proxyBuilder, IActivator target, ServiceEntry entry)
 {
     _container = container;
       _entry = entry;
       _proxyBuilder = proxyBuilder;
       _target = target;
       _proxyGenerator = new ProxyGenerator(_proxyBuilder);
 }
开发者ID:benlovell,项目名称:machine,代码行数:8,代码来源:DynamicProxyActivator.cs


示例6: Bind

			public virtual void Bind(IActivator activator)
			{
				if (_activator != null && activator != null && _activator != activator)
				{
					throw new InvalidOperationException();
				}
				_activator = activator;
			}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:TPFieldIndexConsistencyTestCaseBase.cs


示例7: BottleService

        public BottleService(IActivator activator, IPackageLog log)
        {
            _activator = activator;
            _log = log;

            if(!IsBottleService(activator))
            {
                throw new ArgumentException("Activator must also implement {0}".ToFormat(typeof(IDeactivator).Name), "activator");
            }
        }
开发者ID:DarthFubuMVC,项目名称:bottles,代码行数:10,代码来源:BottleService.cs


示例8: SubstituteTypeExpressionVisitor

 /// <summary>
 /// Initializes a new instance of the <see cref="SubstituteTypeExpressionVisitor"/> class.
 /// </summary>
 /// <param name="activator">The activator.</param>
 public SubstituteTypeExpressionVisitor(IActivator activator)
     : this(
           activator, 
           new ISubstituteTypeConstantHandler[]
                           {
                               new ListSubstituteTypeConstantHandler(), 
                               new EnumerableQuerySubstituteTypeConstantHandler(), 
                               new DataContextQueryableSubstituteTypeConstantHandler(), 
                           })
 {
 }
开发者ID:raimu,项目名称:kephas,代码行数:15,代码来源:SubstituteTypeExpressionVisitor.cs


示例9: Init

 /// <inheritdoc/>
 public virtual void Init(IActivator activator, IKernel kernel, IComponentInfo info, Action<IComponentInfo, object> onDestroying, Action<IComponentContext> onFetch)
 {
     Guard.NotNull(activator, "activator");
     Guard.NotNull(kernel, "kernel");
     Guard.NotNull(info, "info");
     this.Activator = activator;
     this.Kernel = kernel;
     this.Info = info;
     OnDestroying = onDestroying;
     OnFetch = onFetch;
 }
开发者ID:netcasewqs,项目名称:nlite,代码行数:12,代码来源:LifestyleManagerAdapter.cs


示例10: Bind

 public void Bind(IActivator activator) 
 {
     if (_activator == activator)
     {
         return;
     }
     if (activator != null && null != _activator)
     {
         throw new System.InvalidOperationException();
     }
     _activator = activator;
 }
开发者ID:superyfwy,项目名称:db4o,代码行数:12,代码来源:Pilot.cs


示例11: Bind

 public void Bind(IActivator activator)
 {
     if (this.activator == activator)
     {
         return;
     }
     if (activator != null && null != this.activator)
     {
         throw new InvalidOperationException("Object can only be bound to one activator");
     }
     this.activator = activator;
 }
开发者ID:Galigator,项目名称:db4o,代码行数:12,代码来源:CollectionsExample.cs


示例12: Bind

			public virtual void Bind(IActivator activator)
			{
				if (this._activator == activator)
				{
					return;
				}
				if (activator != null && this._activator != null)
				{
					throw new InvalidOperationException();
				}
				this._activator = activator;
			}
开发者ID:erdincay,项目名称:db4o,代码行数:12,代码来源:ActivatorIsNotStoredTestCase.cs


示例13: Bind

			public virtual void Bind(IActivator activator)
			{
				if (_activator == activator)
				{
					return;
				}
				if (_activator != null && activator != null)
				{
					throw new Exception();
				}
				_activator = activator;
			}
开发者ID:Galigator,项目名称:db4o,代码行数:12,代码来源:OrderByWithComparableTestCase.cs


示例14: AddActivator

 public void AddActivator(ServiceEntry entry, IActivator activator)
 {
     using (RWLock.AsWriter(_lock))
       {
     if (_cache.ContainsKey(entry))
     {
       throw new ServiceContainerException("Multiple activators for one entry!");
     }
     _log.Info("Adding: " + entry + " " + activator);
     _cache[entry] = activator;
       }
 }
开发者ID:abombss,项目名称:machine,代码行数:12,代码来源:ActivatorStore.cs


示例15: DecryptElement

        public static XElement DecryptElement(this XElement element, IActivator activator)
        {
            // If no decryption necessary, return original element.
            if (!DoesElementOrDescendentRequireDecryption(element))
            {
                return element;
            }

            // Deep copy the element (since we're going to mutate) and put
            // it into a document to guarantee it has a parent.
            var doc = new XDocument(new XElement(element));

            // We remove elements from the document as we decrypt them and perform
            // fix-up later. This keeps us from going into an infinite loop in
            // the case of a null decryptor (which returns its original input which
            // is still marked as 'requires decryption').
            var placeholderReplacements = new Dictionary<XElement, XElement>();

            while (true)
            {
                var elementWhichRequiresDecryption = doc.Descendants(XmlConstants.EncryptedSecretElementName).FirstOrDefault();
                if (elementWhichRequiresDecryption == null)
                {
                    // All encryption is finished.
                    break;
                }

                // Decrypt the clone so that the decryptor doesn't inadvertently modify
                // the original document or other data structures. The element we pass to
                // the decryptor should be the child of the 'encryptedSecret' element.
                var clonedElementWhichRequiresDecryption = new XElement(elementWhichRequiresDecryption);
                var innerDoc = new XDocument(clonedElementWhichRequiresDecryption);
                string decryptorTypeName = (string)clonedElementWhichRequiresDecryption.Attribute(XmlConstants.DecryptorTypeAttributeName);
                var decryptorInstance = activator.CreateInstance<IXmlDecryptor>(decryptorTypeName);
                var decryptedElement = decryptorInstance.Decrypt(clonedElementWhichRequiresDecryption.Elements().Single());

                // Put a placeholder into the original document so that we can continue our
                // search for elements which need to be decrypted.
                var newPlaceholder = new XElement("placeholder");
                placeholderReplacements[newPlaceholder] = decryptedElement;
                elementWhichRequiresDecryption.ReplaceWith(newPlaceholder);
            }

            // Finally, perform fixup.
            Debug.Assert(placeholderReplacements.Count > 0);
            foreach (var entry in placeholderReplacements)
            {
                entry.Key.ReplaceWith(entry.Value);
            }
            return doc.Root;
        }
开发者ID:hishamco,项目名称:DataProtection,代码行数:51,代码来源:XmlEncryptionExtensions.cs


示例16: Bind

		public void Bind(IActivator activator)
		{
			if (activator == _activator)
			{
				return;
			}

			if (activator != null && _activator != null)
			{
				throw new InvalidOperationException();
			}

			_activator = activator;
		}
开发者ID:Galigator,项目名称:db4o,代码行数:14,代码来源:ActivatableElement.cs


示例17: FillSpecialHeader

 internal override bool FillSpecialHeader(string key, object value)
 {
     if (key != null)
     {
         if (!key.Equals("__ActivationType"))
         {
             if (!key.Equals("__ContextProperties"))
             {
                 if (!key.Equals("__CallSiteActivationAttributes"))
                 {
                     if (!key.Equals("__Activator"))
                     {
                         if (!key.Equals("__ActivationTypeName"))
                         {
                             return base.FillSpecialHeader(key, value);
                         }
                         this._activationTypeName = (string) value;
                     }
                     else
                     {
                         this._activator = (IActivator) value;
                     }
                 }
                 else
                 {
                     this._callSiteActivationAttributes = (object[]) value;
                 }
             }
             else
             {
                 this._contextProperties = (IList) value;
             }
         }
         else
         {
             this._activationType = null;
         }
     }
     return true;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:40,代码来源:ConstructionCall.cs


示例18: Bind

 public void Bind(IActivator activator)
 {
 }
开发者ID:masroore,项目名称:db4o,代码行数:3,代码来源:ActivatedPropertyQueryTestCase.cs


示例19: Activator

 public void Activator(IActivator activator)
 {
     addConfigurableAction(g => g.AddActivator(activator));
 }
开发者ID:rytutis,项目名称:bottles,代码行数:4,代码来源:PackageFacility.cs


示例20: ResolvedServiceEntry

 public ResolvedServiceEntry(ServiceEntry entry, IActivator activator, IObjectInstances objectInstances)
 {
     _entry = entry;
       _objectInstances = objectInstances;
       _activator = activator;
 }
开发者ID:benlovell,项目名称:machine,代码行数:6,代码来源:ResolvedServiceEntry.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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