ValveResourceFormat.Resource.ConstructFromType C# (CSharp) Method

ConstructFromType() private method

private ConstructFromType ( string input ) : Block
input string
return Block
        private Block ConstructFromType(string input)
        {
            switch (input)
            {
                case "DATA":
                    return ConstructResourceType();

                case "REDI":
                    return new ResourceEditInfo();

                case "RERL":
                    return new ResourceExtRefList();

                case "NTRO":
                    return new ResourceIntrospectionManifest();

                case "VBIB":
                    return new VBIB();
            }

            throw new ArgumentException(string.Format("Unrecognized block type '{0}'", input));
        }