Exemplo n.º 1
0
 public ToffeeService(ToffeeNetwork network, Type type)
     : base(network, type)
 {
     _Methods = new List <ToffeeMethod>();
     MethodIdentifierLookup = new Dictionary <string, ToffeeMethod>();
     MethodLookup           = new Dictionary <uint, ToffeeMethod>();
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
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>();
        }
Exemplo n.º 4
0
        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);
        }