Exemplo n.º 1
0
		public OpenInterestData(DateTime date, ZBuffer buffer) {
			__cDate = date.Date;
			__cInterest = new Dictionary<string, int>(128);

			while (buffer.Position < buffer.Length) {
				__cInterest.Add(buffer.GetString(), buffer.GetInt32());
			}
		}
Exemplo n.º 2
0
		public static ForeignInvestmentGroup Load(DateTime date) {
			ForeignInvestmentGroup cData = new ForeignInvestmentGroup();

			string sFile = string.Format("{0}FI\\{1}.dat", GlobalSettings.Paths.DatabasePath, date.ToString("yyyyMMdd"));
			if (File.Exists(sFile)) {
				byte[] bArray = File.ReadAllBytes(sFile);
				ZBuffer cBuffer = new ZBuffer();
				cBuffer.Data = bArray;
				cBuffer.Length = bArray.Length;

				for (int i = 0; i < 4; i++) {
					string sSymbolId = cBuffer.GetString();
					cData.Add(sSymbolId, ForeignInvestmentData.Create(cBuffer));
				}
			}
			return cData;
		}