예제 #1
0
        // Keep this as a separate function so inheritors can call it in their ctors

        protected void Calculate(ICollection coll, IBuildContext ctxt, Fingerprint cached)
        {
            CompositeFingerprint cf = cached as CompositeFingerprint;

            children = new Fingerprint[coll.Count];
            int i = 0;

            if (cf != null && cf.children.Length == coll.Count)
            {
                foreach (IFingerprintable item in coll)
                {
                    children[i] = GenericFingerprints.GetFingerprint(item, ctxt,
                                                                     cf.children[i]);
                    i++;
                }
            }
            else
            {
                foreach (IFingerprintable item in coll)
                {
                    children[i] = GenericFingerprints.GetFingerprint(item, ctxt, null);
                    i++;
                }
            }

            value = Calculate(children);
        }
예제 #2
0
파일: MBBool.cs 프로젝트: retahc/old-code
        // Fingerprint

        public override Fingerprint GetFingerprint(IBuildContext ctxt, Fingerprint cached)
        {
            return(GenericFingerprints.GetFingerprint(value, ctxt, cached));
        }