/// <summary> /// [async]共有オブジェクトへのwrite /// </summary> public void OnWrite(OnWriteDelegate doWork) { lock (this.SyncObject) { doWork(this.sharedObject); isDirty = true; } }
public ColorGrabber(Texture texture, int width, int height) { if (Thread.CurrentThread != Program.MainThread) { throw new ThreadStateException(); } OnWrite = null; _texture = texture; _width = width; _height = height; _array = null; _disposed = false; Resize(width, height); }