Exemplo n.º 1
0
            public static string ReadFrom(XmlDictionaryReader reader)
            {
                string prefix;
                string uri = XmlHelper.ReadEmptyElementAndRequiredAttribute(reader, ElementName, NamespaceUri, ReferenceList.UriAttribute, out prefix);

                if (uri.Length < 2 || uri[0] != '#')
                {
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
                              new SecurityMessageSerializationException(SR.GetString(SR.InvalidDataReferenceInReferenceList, uri)));
                }
                return(uri.Substring(1));
            }
Exemplo n.º 2
0
            public static string ReadFrom(XmlDictionaryReader reader)
            {
                string prefix;
                string str = XmlHelper.ReadEmptyElementAndRequiredAttribute(reader, ReferenceList.DataReference.ElementName, ReferenceList.DataReference.NamespaceUri, ReferenceList.UriAttribute, out prefix);

                if (str.Length < 2 || (int)str[0] != 35)
                {
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperError((Exception) new SecurityMessageSerializationException(SR.GetString("InvalidDataReferenceInReferenceList", new object[1] {
                        (object)str
                    })));
                }
                return(str.Substring(1));
            }