public ToffeeService(ToffeeNetwork network, Type type) : base(network, type) { _Methods = new List <ToffeeMethod>(); MethodIdentifierLookup = new Dictionary <string, ToffeeMethod>(); MethodLookup = new Dictionary <uint, ToffeeMethod>(); }
public ToffeeStruct(ToffeeNetwork network, Type type) : base(network, type) { _Properties = new List <ToffeeProperty>(); PropertyIdentifierLookup = new Dictionary <string, ToffeeProperty>(); PropertyLookup = new Dictionary <uint, ToffeeProperty>(); MinimumSize = 0; }
public ToffeeObject(ToffeeNetwork network, Type type) { Network = network; Type = type; _Fields = new List <ToffeeField>(); FieldIdentifierLookup = new Dictionary <string, ToffeeField>(); FieldLookup = new Dictionary <uint, ToffeeField>(); }
public static ToffeeNetwork CreateNetwork(string networkName, string suffix = "", bool includeStd = true) { if (NetworkCache.ContainsKey(new Tuple <string, string>(networkName, suffix))) { ToffeeNetwork cachedNetwork = NetworkCache[new Tuple <string, string>(networkName, suffix)]; if ((includeStd) && (cachedNetwork.ContainsNetwork(StandardToffeeNetwork))) { return(cachedNetwork); } if ((!includeStd) && (!cachedNetwork.ContainsNetwork(StandardToffeeNetwork))) { return(cachedNetwork); } } ToffeeNetwork network = new ToffeeNetwork(networkName); if (includeStd) { network.AddObjectsToNetwork(StandardToffeeNetwork); } NetworkCache.Add(new Tuple <string, string>(networkName, suffix), network); return(network); }