public ContentManager(ContentSettings settings) { this._state = State.Idle; this._repositoryPath = settings.RepositoryPath; this._contentPath = settings.ContentPath; this._ignoreVersionComponent = settings.IgnoreVersionComponent; this._buildQueue = new ConcurrentQueue<Trigger>(); this._workQueue = new BlockingCollection<Trigger>(this._buildQueue); this._template = settings.Template; this._contentLock = new ReaderWriterLockSlim(); this._workProcess = new TaskFactory().StartNew(this.WorkerMethod); string contentRefPath = Path.Combine(this._contentPath, _CONTENT_REF_NAME); if (File.Exists(contentRefPath)) this._currentContentRef = File.ReadAllText(contentRefPath).Trim(); else this._currentContentRef = null; }
public ContentManager(ContentSettings settings) { this._state = State.Idle; this._repositoryPath = settings.RepositoryPath; this._contentPath = settings.ContentPath; this._ignoreVersionComponent = settings.IgnoreVersionComponent; this._buildQueue = new ConcurrentQueue <Trigger>(); this._workQueue = new BlockingCollection <Trigger>(this._buildQueue); this._template = settings.Template; this._contentLock = new ReaderWriterLockSlim(); this._workProcess = new TaskFactory().StartNew(this.WorkerMethod); string contentRefPath = Path.Combine(this._contentPath, _CONTENT_REF_NAME); if (File.Exists(contentRefPath)) { this._currentContentRef = File.ReadAllText(contentRefPath).Trim(); } else { this._currentContentRef = null; } }
public static void Initialize(ContentSettings settings) { ContentManager._instance = new ContentManager(settings); }