Exemplo n.º 1
0
        private bool IsMatch()
        {
            IXmlKnownType knownType;

            return(knownTypes.TryGet(this, out knownType)
                                ? Try.Success(out type, knownType.ClrType)
                                : Try.Failure(out type));
        }
Exemplo n.º 2
0
        public static IXmlKnownType Require(this IXmlKnownTypeMap map, Type clrType)
        {
            IXmlKnownType knownType;

            if (map.TryGet(clrType, out knownType))
            {
                return(knownType);
            }

            throw Error.NotXmlKnownType(clrType);
        }