Exemple #1
0
        /// <summary>
        /// Discover all available run targets.
        /// </summary>
        public static IEnumerable <RunTargetBase> DiscoverFromAllProviders()
        {
            if (m_Providers == null)
            {
                m_Providers = TypeConstructionUtility.ConstructTypesDerivedFrom <RunTargetProviderBase>().ToArray();
            }

            return(m_Providers.SelectMany(x => x.Discover()));
        }
Exemple #2
0
        public BuildPipelineBase Deserialize(SerializedValueView view)
        {
            if (view.Type != TokenType.String)
            {
                return(null);
            }

            var json = view.AsStringView().ToString();

            if (string.IsNullOrEmpty(json))
            {
                return(null);
            }

            if (TypeConstructionUtility.TryConstructFromAssemblyQualifiedTypeName <BuildPipelineBase>(json, out var step))
            {
                return(step);
            }

            throw new ArgumentException($"Failed to construct type. Could not resolve type from TypeName=[{json}].");
        }