示例#1
0
        protected override int CalculateSeriesCreationHash(Event master)
        {
            string s = EntitySerializer.Serialize <Event>(master);

            byte[] bytes = Encoding.UTF8.GetBytes(s);
            return((int)ComputeCRC.Compute(0U, bytes, 0, bytes.Length));
        }
        protected override int CalculateSeriesCreationHash(Event master)
        {
            List <byte> list = new List <byte>();
            string      s    = EntitySerializer.Serialize <IList <Event> >(this.AdditionalInstancesToAdd);

            list.AddRange(Encoding.UTF8.GetBytes(s));
            list.AddRange(Encoding.UTF8.GetBytes(this.SingleEventId));
            byte[] array = list.ToArray();
            return((int)ComputeCRC.Compute(0U, array, 0, array.Count <byte>()));
        }