Animatroller.Framework.LogicalDevice.SingleOwnerDevice.SingleOwnerDevice C# (CSharp) Метод

SingleOwnerDevice() публичный Метод

public SingleOwnerDevice ( string name ) : System
name string
Результат System
        public SingleOwnerDevice(string name)
            : base(name)
        {
            this.owners = new List<IControlToken>();
            this.outputData = new ControlSubject<IData, IControlToken>(null, HasControl);
            this.outputChanged = new Subject<IData>();

            this.outputData.Subscribe(x =>
            {
                lock (this.lockObject)
                {
                    var data = PreprocessPushData(x);

                    var usedKeys = new HashSet<DataElements>();

                    var dataList = this.currentData.Copy();

                    foreach (var kvp in data.ToList())
                    {
                        usedKeys.Add(kvp.Key);

                        switch (kvp.Key)
                        {
                            case DataElements.PixelBitmap:
                                dataList[kvp.Key] = new System.Drawing.Bitmap((System.Drawing.Bitmap)kvp.Value);
                                break;

                            default:
                                dataList[kvp.Key] = kvp.Value;
                                break;
                        }
                    }

                    dataList.Where(k => !usedKeys.Contains(k.Key)).ToList()
                        .ForEach(k => this.currentData.Remove(k.Key));

                    this.currentData = dataList;

                    this.outputChanged.OnNext(CurrentData);
                }
            });
        }