public MetaPropertyAttribute(string name, BinPropertyType type, string otherClass, BinPropertyType primaryType, BinPropertyType secondaryType) { this.Name = name; this.NameHash = Fnv1a.HashLower(name); this.OtherClass = otherClass; this.ValueType = type; this.PrimaryType = primaryType; this.SecondaryType = secondaryType; }
private static Dictionary <uint, string> ParseBinHashtable(string filePath) { Dictionary <uint, string> map = new Dictionary <uint, string>(); foreach (string line in File.ReadAllLines(filePath)) { string hashString = line.Split(" ")[1]; uint hash = Fnv1a.HashLower(hashString); if (map.ContainsKey(hash) is false) { map.Add(hash, hashString); } } return(map); }
public void WriteMetaClasses(Stream stream, ICollection <string> classNames, ICollection <string> propertyNames) { // Create dictionaries from collections Dictionary <uint, string> classNameMap = new(classNames.Count); Dictionary <uint, string> propertyNameMap = new(propertyNames.Count); foreach (string className in classNames) { classNameMap.Add(Fnv1a.HashLower(className), className); } foreach (string propertyName in propertyNames) { propertyNameMap.Add(Fnv1a.HashLower(propertyName), propertyName); } WriteMetaClasses(stream, classNameMap, propertyNameMap); }
public MetaHash(string value) { this.Hash = Fnv1a.HashLower(value); this.Value = value; }
public static BinTreeObject Serialize <T>(MetaEnvironment environment, string path, T metaClass) where T : IMetaClass { return(Serialize(environment, Fnv1a.HashLower(path), metaClass)); }
public MetaPropertyAttribute(string name, BinPropertyType type) { this.Name = name; this.NameHash = Fnv1a.HashLower(name); this.ValueType = type; }