Exemplo n.º 1
0
        public UnityObject WithPostProcessor(Func <UnityObject, IAssetPostProcessor> PostProcessorFactory)
        {
            if (PostProcessorFactory != null)
            {
                _assetPostProcessor = PostProcessorFactory(this);
            }

            return(this);
        }
Exemplo n.º 2
0
        public IAssetLocatorRegistry AddAssetPostProcessor(IAssetPostProcessor postProcessor)
        {
            foreach (var type in postProcessor.SupportedTypes)
            {
                if (_postProcessors.ContainsKey(type))
                {
                    throw new InvalidOperationException($"A post-processor is already defined for {type}");
                }
                _postProcessors[type] = postProcessor;
            }

            return(this);
        }
Exemplo n.º 3
0
        public IModApplier AddAssetPostProcessor(IAssetPostProcessor postProcessor)
        {
            if (postProcessor == null)
            {
                throw new ArgumentNullException(nameof(postProcessor));
            }
            foreach (var type in postProcessor.SupportedTypes)
            {
                if (_postProcessors.ContainsKey(type))
                {
                    throw new InvalidOperationException($"A post-processor is already defined for {type}");
                }
                _postProcessors[type] = postProcessor;
            }

            if (postProcessor is IComponent component)
            {
                AttachChild(component);
            }

            return(this);
        }
Exemplo n.º 4
0
 public IAssetLocatorRegistry AddAssetPostProcessor(IAssetPostProcessor postProcessor) => this;
Exemplo n.º 5
0
 public IModApplier AddAssetPostProcessor(IAssetPostProcessor postProcessor) => throw new NotImplementedException();
Exemplo n.º 6
0
 public IAssetLocator AddAssetPostProcessor(IAssetPostProcessor postProcessor) => this;