Ejemplo n.º 1
0
        internal static OpenXmlSimpleType CreateTargetValueObject(RedirectedRestriction redirectedRestriction, FileFormatVersions fileFormatVersion)
        {
            switch (fileFormatVersion)
            {
            case FileFormatVersions.Office2007:
                return(O12UnionHelper.CreateTargetValueObject(redirectedRestriction));

            case FileFormatVersions.Office2010:
                return(O14UnionHelper.CreateTargetValueObject(redirectedRestriction));

            case FileFormatVersions.Office2013:
                return(O15UnionHelper.CreateTargetValueObject(redirectedRestriction));

            case FileFormatVersions.Office2016:
                return(O16UnionHelper.CreateTargetValueObject(redirectedRestriction));

            default:
                Debug.Assert(fileFormatVersion == FileFormatVersions.Office2007 || fileFormatVersion == FileFormatVersions.Office2010 || fileFormatVersion == FileFormatVersions.Office2013 || fileFormatVersion == FileFormatVersions.Office2013);
                break;
            }
            return(null);
        }
Ejemplo n.º 2
0
        internal static OpenXmlSimpleType[] CreatePossibleMembers(UnionValueRestriction unionValueRestriction, FileFormatVersions fileFormatVersion)
        {
            switch (fileFormatVersion)
            {
            case FileFormatVersions.Office2007:
                return(O12UnionHelper.CreatePossibleMembers(unionValueRestriction));

            case FileFormatVersions.Office2010:
                return(O14UnionHelper.CreatePossibleMembers(unionValueRestriction));

            case FileFormatVersions.Office2013:
                return(O15UnionHelper.CreatePossibleMembers(unionValueRestriction));

            case FileFormatVersions.Office2016:
                return(O16UnionHelper.CreatePossibleMembers(unionValueRestriction));

            default:
                Debug.Assert(fileFormatVersion == FileFormatVersions.Office2007 || fileFormatVersion == FileFormatVersions.Office2010 || fileFormatVersion == FileFormatVersions.Office2013 || fileFormatVersion == FileFormatVersions.Office2016);
                break;
            }
            return(null);
        }