Exemplo n.º 1
0
 internal LoaderAmbientFacet(LoaderExtension extension, Guid ambientToken, IFacet facet, FacetMoniker moniker)
     : base(extension)
 {
     AmbientToken = ambientToken;
     IFacet       = facet;
     Moniker      = moniker;
 }
Exemplo n.º 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>();
            }
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 internal LoaderCommandContainer(LoaderExtension extension, CommandContainer container, TypeMoniker containerType)
     : base(extension)
 {
     Container     = container;
     ContainerType = containerType;
 }
Exemplo n.º 5
0
 public ExtensionHooks(LoaderExtension extension)
 {
     _extension = extension;
     _store     = new Lazy <KeyValueStore>(CreateKeyValueStore);
 }
Exemplo n.º 6
0
 internal LoaderCommand(LoaderExtension extension, Command command)
     : base(extension)
 {
     Command  = command;
     _aliases = new ReadOnlyCollection <string>(Command.OriginalAliases);
 }
Exemplo n.º 7
0
 internal LoaderFacetType(LoaderExtension extension, TypeDescriptor facetType)
     : base(extension)
 {
     Type           = facetType;
     TypeDescriptor = facetType;
 }
Exemplo n.º 8
0
 public LoaderConfiguratorType(LoaderExtension extension, TypeMoniker type)
     : base(extension)
 {
     _metadata = new Lazy <ConfiguratorMetadata>(GetMetadata);
     Type      = type;
 }