Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit d3bccee

Browse files
committed
Cleanup unused code
1 parent eb9a030 commit d3bccee

File tree

3 files changed

+3
-41
lines changed

3 files changed

+3
-41
lines changed

src/GitHub.Api/GitHub.Api.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
<Compile Include="Git\GitObjectFactory.cs" />
115115
<Compile Include="Git\GitStatusEntry.cs" />
116116
<Compile Include="Git\IGitObjectFactory.cs" />
117-
<Compile Include="IApplicationCache.cs" />
118117
<Compile Include="IO\FileSystemHelpers.cs" />
119118
<Compile Include="IApplicationManager.cs" />
120119
<Compile Include="NewTaskSystem\ActionTask.cs" />

src/GitHub.Api/IApplicationCache.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
using System;
22
using System.IO;
33
using System.Linq;
4-
using System.Threading.Tasks;
54
using UnityEditorInternal;
65
using UnityEngine;
7-
using Object = UnityEngine.Object;
86

97
namespace GitHub.Unity
108
{
11-
sealed class ApplicationCache : ScriptableObject, ISerializationCallbackReceiver, IApplicationCache
9+
sealed class ApplicationCache : ScriptableObject
1210
{
1311
private static ApplicationCache instance;
1412
private static string cachePath;
@@ -24,24 +22,7 @@ private set
2422
}
2523
}
2624

27-
[SerializeField] private string createdDate;
28-
public string CreatedDate
29-
{
30-
get { return createdDate; }
31-
}
32-
33-
[SerializeField] private bool usageIncremented;
34-
public bool UsageIncremented
35-
{
36-
get { return usageIncremented; }
37-
set
38-
{
39-
usageIncremented = value;
40-
Flush();
41-
}
42-
}
43-
44-
public static IApplicationCache Instance
25+
public static ApplicationCache Instance
4526
{
4627
get { return instance ?? CreateApplicationCache(EntryPoint.Environment); }
4728
}
@@ -69,23 +50,14 @@ private static ApplicationCache CreateApplicationCache(IEnvironment environment)
6950
}
7051

7152
instance = CreateInstance<ApplicationCache>();
72-
instance.createdDate = DateTime.Now.ToLongTimeString();
7353
instance.Flush();
7454

7555
return instance;
7656
}
7757

7858
private void Flush()
7959
{
80-
InternalEditorUtility.SaveToSerializedFileAndForget(new Object[] { this }, cachePath, true);
81-
}
82-
83-
void ISerializationCallbackReceiver.OnBeforeSerialize()
84-
{
85-
}
86-
87-
void ISerializationCallbackReceiver.OnAfterDeserialize()
88-
{
60+
InternalEditorUtility.SaveToSerializedFileAndForget(new UnityEngine.Object[] { this }, cachePath, true);
8961
}
9062
}
9163
}

0 commit comments

Comments
 (0)