コード例 #1
0
 internal static DiagnosticService CreateDiagnosticService(int numReqProcs)
 {
     // create a bunch of dummy procedure types (without procedure plans)
     HashedSet<ProcedureType> procedureTypes = new HashedSet<ProcedureType>();
     for (int p = 0; p < numReqProcs; p++)
     {
         ProcedureType pt = new ProcedureType("20" + p, "Procedure 20" + p);
         procedureTypes.Add(pt);
     }
     return new DiagnosticService("301", "Diagnostic Service 301", procedureTypes);
 }
コード例 #2
0
		public static ISet CreateFilterKeys(IDictionary<string, IFilter> enabledFilters, EntityMode entityMode)
		{
			if (enabledFilters.Count == 0)
				return null;
			Set result = new HashedSet();
			foreach (FilterImpl filter in enabledFilters.Values)
			{
				FilterKey key = new FilterKey(filter.Name, filter.Parameters, filter.FilterDefinition.ParameterTypes, entityMode);
				result.Add(key);
			}
			return result;
		}
コード例 #3
0
        protected KokOzelDurumu.Uretici uretici(KokOzelDurumTipi tip, HarfDizisiIslemi islem) 
        {

            // bir adet kok ozel durumu uretici olustur.
            KokOzelDurumu.Uretici uretici = new KokOzelDurumu.Uretici(tip, islem);

            // eger varsa kok adlarini kullanarak iliskili ekleri bul ve bir Set'e ata.
            String[] ekAdlari = tip.EkAdlari;
            if (ekAdlari.Length > 0) {
                Set<Ek> set = new HashedSet<Ek>();
                foreach (String s in ekAdlari) {
                    Ek ek = ekYonetici.ek(s);
                    if (ek != null) {
                        set.Add(ek);
                    } else {
                        logger.Warn(s + " eki bulunamadigindan kok ozel durumuna eklenemedi!");
                    }
                }
                // ureticiye seti ata.
                uretici.gelebilecekEkler(set);
            }
            return uretici;
        }
コード例 #4
0
        List<DolazakNaTrening> findNeplaceniDolasci(List<DolazakNaTrening> dolasci, DateTime from, DateTime to,
            List<UplataClanarine> uplate)
        {
            ISet uplateSet = new HashedSet();
            foreach (UplataClanarine u in uplate)
            {
                if (u.VaziOd.Value >= from && u.VaziOd.Value <= to)
                {
                    uplateSet.Add(new ClanGodinaMesec(u.Clan.Id, u.VaziOd.Value.Year, u.VaziOd.Value.Month));
                }
            }

            List<DolazakNaTrening> result = new List<DolazakNaTrening>();
            foreach (DolazakNaTrening d in dolasci)
            {
                if (!uplateSet.Contains(new ClanGodinaMesec(d.Clan.Id, d.DatumDolaska.Value.Year, d.DatumDolaska.Value.Month)))
                {
                    result.Add(d);
                }
            }
            return result;
        }