Beispiel #1
0
        public static void Validate(ServiceControlInstance instance)
        {
            var validator = new QueueNameValidator(instance)
            {
                instances = ServiceControlInstance.Instances().Where(p => p.Name != instance.Name & p.TransportPackage.Equals(instance.TransportPackage, StringComparison.OrdinalIgnoreCase)).AsEnumerable <IContainTransportInfo>().ToList()
            };

            validator.RunValidation();
        }
        public static void Validate(IServiceControlAuditInstance instance)
        {
            var validator = new QueueNameValidator(instance)
            {
                SCInstances    = InstanceFinder.ServiceControlInstances().Where(p => p.Name != instance.Name & p.TransportPackage.Equals(instance.TransportPackage)).AsEnumerable <IServiceControlInstance>().ToList(),
                AuditInstances = InstanceFinder.ServiceControlAuditInstances().Where(p => p.Name != instance.Name & p.TransportPackage.Equals(instance.TransportPackage)).AsEnumerable <IServiceControlAuditInstance>().ToList(),
            };

            validator.RunValidation();
        }