Exemplo n.º 1
0
        /**
         * Makes a copy of this asset.
         */
        public FastAsset Copy()
        {
            FastAsset asset = new FastAsset();

            asset.SetAssetId(GetAssetId());
            asset.SetValue(GetValue());
            return(asset);
        }
Exemplo n.º 2
0
        public Object Clone()
        {
            DeltaFastAssetAccount clonePtr = new DeltaFastAssetAccount();

            clonePtr.assets = new Dictionary <Int32, FastAsset>();
            Int32 mapCount = clonePtr.assets.Count;

            foreach (KeyValuePair <int, FastAsset> item in clonePtr.assets)
            {
                Int32     key   = item.Key;
                FastAsset asset = item.Value as FastAsset;
                clonePtr.assets.Add(key, asset.Copy());
            }
            return(clonePtr);
        }
Exemplo n.º 3
0
 public FastAssetAccount(Int32 index, bool encodeTimestp, Int32 maxVal, Int32 asstSize)
 {
     customerName = "Milton Moneybags";
     netWorth     = 0.0;
     assets       = new Dictionary <Int32, FastAsset>();
     for (int i = 0; i < asstSize; i++)
     {
         FastAsset asset = new FastAsset(i, maxVal);
         assets.Add(i, asset);
         netWorth += asset.GetValue();
     }
     if (encodeTimestamp)
     {
         DateTime startTime = DateTime.Now;
         timestamp = startTime.Ticks * (1000000 / TimeSpan.TicksPerMillisecond);
     }
 }