コード例 #1
0
 internal LoaderAmbientFacet(LoaderExtension extension, Guid ambientToken, IFacet facet, FacetMoniker moniker)
     : base(extension)
 {
     AmbientToken = ambientToken;
     IFacet       = facet;
     Moniker      = moniker;
 }
コード例 #2
0
        internal LoaderFacetFactory(LoaderExtension extension, IFacetFactory factory, TypeDescriptor type,
                                    FacetFactoryAttribute attribute)
            : base(extension)
        {
            _facetTypeDescriptors = new Lazy <ReadOnlyCollection <TypeDescriptor> >(
                () => new ReadOnlyCollection <TypeDescriptor>(Factory.GetFacetTypes().Select(TypeDescriptor.Get).ToArray()));

            Factory        = factory;
            TypeDescriptor = type;
            Type           = type;
            Name           = attribute == null ? type.FullName : attribute.Name;
            _aliases       = new ReadOnlyCollection <string>(attribute == null ? new string[] { } : attribute.AliasesSplit);
            _isIndexed     = Factory is IFacetFactoryWithIndex;
            if (_isIndexed)
            {
                _indexingConfigurationExceptions = new List <RequiresConfigurationException>();
            }
        }
コード例 #3
0
ファイル: Loader.cs プロジェクト: benpetermorris/commando
        private static bool IsExtensionLoaded(LoaderExtension ext, IList <LoaderExtension> extList)
        {
            var lae = ext as LoaderAssemblyExtension;

            if (lae != null)
            {
                return(IsExtensionLoaded(lae.GetAssemblyName(), extList));
            }

            var lse = ext as LoaderScriptExtension;

            if (lse != null)
            {
                return(extList
                       .OfType <LoaderScriptExtension>()
                       .Any(x => x.Path == lse.Path));
            }

            return(false);
        }
コード例 #4
0
 internal LoaderCommandContainer(LoaderExtension extension, CommandContainer container, TypeMoniker containerType)
     : base(extension)
 {
     Container     = container;
     ContainerType = containerType;
 }
コード例 #5
0
 public ExtensionHooks(LoaderExtension extension)
 {
     _extension = extension;
     _store     = new Lazy <KeyValueStore>(CreateKeyValueStore);
 }
コード例 #6
0
 internal LoaderCommand(LoaderExtension extension, Command command)
     : base(extension)
 {
     Command  = command;
     _aliases = new ReadOnlyCollection <string>(Command.OriginalAliases);
 }
コード例 #7
0
 internal LoaderFacetType(LoaderExtension extension, TypeDescriptor facetType)
     : base(extension)
 {
     Type           = facetType;
     TypeDescriptor = facetType;
 }
コード例 #8
0
 public LoaderConfiguratorType(LoaderExtension extension, TypeMoniker type)
     : base(extension)
 {
     _metadata = new Lazy <ConfiguratorMetadata>(GetMetadata);
     Type      = type;
 }