示例#1
0
            /// <summary>
            /// Erzeugt eine neue Verwaltung.
            /// </summary>
            /// <param name="rulePath">Der volle Pfad zur Regeldatei.</param>
            /// <param name="resourceNameComparer">Die Vergleichsmethode </param>
            public Implementation(string rulePath, IEqualityComparer <string> resourceNameComparer)
            {
                // Remember
                ResourceNameComparer = resourceNameComparer;

                // Load rules
                if (string.IsNullOrEmpty(rulePath))
                {
                    m_PlanComparer = CustomComparer.Default(ResourceNameComparer);
                }
                else
                {
                    m_PlanComparer = CustomComparer.Create(File.ReadAllBytes(rulePath), resourceNameComparer);
                }
            }
 /// <summary>
 /// Erzeugt eine neue Planungsinstanz.
 /// </summary>
 /// <param name="nameComparer">Der Algorithmus zum Vergleich von Gerätenamen.</param>
 /// <param name="rules">Der Inhalt der Regeldatei.</param>
 public RecordingScheduler(IEqualityComparer <string> nameComparer, byte[] rules)
     : this(new ResourceCollection(), new HashSet <Guid>(), null, (rules == null) ? CustomComparer.Default(nameComparer) : CustomComparer.Create(rules, nameComparer))
 {
 }