X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=OpenTween%2FApplicationContainer.cs;h=76291616c8df767132ab35cd48d6359dd3779f75;hb=49bc798ede699728482340de0262e4ebfc9246f1;hp=3a32e95c2136af21a372c3ea78749e4011a0040b;hpb=4e8fd83895238cff43df05ee49a085dd5f9c9356;p=opentween%2Fopen-tween.git diff --git a/OpenTween/ApplicationContainer.cs b/OpenTween/ApplicationContainer.cs index 3a32e95c..76291616 100644 --- a/OpenTween/ApplicationContainer.cs +++ b/OpenTween/ApplicationContainer.cs @@ -22,9 +22,9 @@ #nullable enable using System; -using OpenTween.Api; using OpenTween.Models; using OpenTween.Setting; +using OpenTween.SocialProtocol; using OpenTween.Thumbnail; using OpenTween.Thumbnail.Services; @@ -41,11 +41,8 @@ namespace OpenTween public CultureService CultureService => this.cultureServiceLazy.Value; - public TwitterApi TwitterApi - => this.twitterApiLazy.Value; - - public Twitter Twitter - => this.twitterLazy.Value; + public AccountCollection AccountCollection + => this.accountCollectionLazy.Value; public ImageCache ImageCache => this.imageCacheLazy.Value; @@ -63,8 +60,7 @@ namespace OpenTween => this.mainFormLazy.Value; private readonly Lazy cultureServiceLazy; - private readonly DisposableLazy twitterApiLazy; - private readonly DisposableLazy twitterLazy; + private readonly DisposableLazy accountCollectionLazy; private readonly DisposableLazy imageCacheLazy; private readonly DisposableLazy iconAssetsManagerLazy; private readonly DisposableLazy imgAzyobuziNetLazy; @@ -77,8 +73,7 @@ namespace OpenTween SettingManager.Instance = settings; this.cultureServiceLazy = new(this.CreateCultureService); - this.twitterApiLazy = new(this.CreateTwitterApi); - this.twitterLazy = new(this.CreateTwitter); + this.accountCollectionLazy = new(this.CreateAccountCollection); this.imageCacheLazy = new(this.CreateImageCache); this.iconAssetsManagerLazy = new(this.CreateIconAssetsManager); this.imgAzyobuziNetLazy = new(this.CreateImgAzyobuziNet); @@ -89,12 +84,9 @@ namespace OpenTween private CultureService CreateCultureService() => new(this.Settings.Common); - private TwitterApi CreateTwitterApi() + private AccountCollection CreateAccountCollection() => new(); - private Twitter CreateTwitter() - => new(this.TwitterApi); - private ImageCache CreateImageCache() => new(); @@ -108,7 +100,7 @@ namespace OpenTween => new(this.ImgAzyobuziNet); private TweenMain CreateTweenMain() - => new(this.Settings, this.TabInfo, this.Twitter, this.ImageCache, this.IconAssetsManager, this.ThumbnailGenerator); + => new(this.Settings, this.TabInfo, this.AccountCollection, this.ImageCache, this.IconAssetsManager, this.ThumbnailGenerator); public void Dispose() { @@ -118,8 +110,7 @@ namespace OpenTween this.IsDisposed = true; this.mainFormLazy.Dispose(); this.imgAzyobuziNetLazy.Dispose(); - this.twitterLazy.Dispose(); - this.twitterApiLazy.Dispose(); + this.accountCollectionLazy.Dispose(); this.iconAssetsManagerLazy.Dispose(); this.imageCacheLazy.Dispose(); }