System.Xml.Serialization.SchemaObjectCache.GetHash C# (CSharp) Method

GetHash() private method

private GetHash ( XmlSchemaObject o ) : int
o System.Xml.Schema.XmlSchemaObject
return int
        private int GetHash(XmlSchemaObject o) {
            object hash = Hash[o];
            if (hash != null) {
                if (hash is XmlSchemaObject) {
                }
                else {
                    return (int)hash;
                }
            }
            // new object, generate the hash
            string hashString = ToString(o, new SchemaObjectWriter());
            looks[o] = hashString;
            int code = hashString.GetHashCode();
            Hash[o] = code;
            return code;
        }