コード例 #1
0
        public Client CreateClient(string customerName)
        {
            var client = new Client(null)
            {
                id   = clients.GetNextID(),
                name = customerName
            };

            clients.AddClient(client);
            return(client);
        }
コード例 #2
0
ファイル: Pipeline.cs プロジェクト: allisterb/Fss
        protected int AddService(IService service)
        {
            int i = Services.Count;

            if (i == 0)
            {
                service.AddClients(MonitorClients);
                service.Pipeline = this;
                Services.Add(0, service);
            }
            else
            {
                service.AddClient(Services.Last().Value.Type);
                service.Pipeline = this;
                Services.Add(i, service);
            }
            return(i);
        }