private void RegisterExtenderProvider(string catId) { const string name = AutoT4ExtenderProvider.Name; _objectExtenders = _objectExtenders ?? GetService(typeof(ObjectExtenders)) as ObjectExtenders; if (_objectExtenders == null) { return; } _extenderProvider = _extenderProvider ?? new AutoT4ExtenderProvider(_dte, this); _extenderProviderCookies.Add(_objectExtenders.RegisterExtenderProvider(catId, name, _extenderProvider)); }
private async Task RegisterExtenderProviderAsync(string catId) { await JoinableTaskFactory.SwitchToMainThreadAsync(DisposalToken); const string name = AutoT4ExtenderProvider.Name; _objectExtenders = _objectExtenders ?? await GetServiceAsync(typeof(ObjectExtenders)) as ObjectExtenders; Assumes.Present(_objectExtenders); _extenderProvider = _extenderProvider ?? new AutoT4ExtenderProvider(_dte); _extenderProviderCookies.Add(_objectExtenders.RegisterExtenderProvider(catId, name, _extenderProvider)); }
private void RegisterExtenderProvider(string catId) { const string name = AutoT4ExtenderProvider.Name; _objectExtenders = _objectExtenders ?? GetService(typeof(ObjectExtenders)) as ObjectExtenders; if (_objectExtenders == null) return; _extenderProvider = _extenderProvider ?? new AutoT4ExtenderProvider(_dte); _extenderProviderCookies.Add(_objectExtenders.RegisterExtenderProvider(catId, name, _extenderProvider)); }