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

Commit b465fc6

Browse files
committed
Kill some more unused code
1 parent 4ee058a commit b465fc6

File tree

2 files changed

+2
-47
lines changed

2 files changed

+2
-47
lines changed

src/GitHub.Api/Events/RepositoryWatcher.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,6 @@ private int ProcessEvents(Event[] fileEvents)
169169
var eventDirectory = new NPath(fileEvent.Directory);
170170
var fileA = eventDirectory.Combine(fileEvent.FileA);
171171

172-
NPath fileB = null;
173-
if (fileEvent.FileB != null)
174-
{
175-
fileB = eventDirectory.Combine(fileEvent.FileB);
176-
}
177-
178172
// handling events in .git/*
179173
if (fileA.IsChildOf(paths.DotGitPath))
180174
{

src/GitHub.Api/Tasks/TaskBase.cs

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ public interface ITask : IAsyncResult
3333
ITask Start(TaskScheduler scheduler);
3434
ITask Progress(Action<IProgress> progressHandler);
3535

36-
void Wait();
37-
bool Wait(int milliseconds);
3836
bool Successful { get; }
3937
string Errors { get; }
4038
Task Task { get; }
@@ -373,16 +371,6 @@ protected TaskBase GetTopMostTask(TaskBase ret, bool onlyCreatedState)
373371
return depends.GetTopMostTask(ret, onlyCreatedState);
374372
}
375373

376-
public virtual void Wait()
377-
{
378-
Task.Wait(Token);
379-
}
380-
381-
public virtual bool Wait(int milliseconds)
382-
{
383-
return Task.Wait(milliseconds, Token);
384-
}
385-
386374
protected virtual void Run(bool success)
387375
{
388376
}
@@ -443,8 +431,8 @@ protected Exception GetThrownException()
443431

444432
if (DependsOn.Task.Status == TaskStatus.Faulted)
445433
{
446-
var exception = DependsOn.Task.Exception;
447-
return exception?.InnerException ?? exception;
434+
var ex = DependsOn.Task.Exception;
435+
return ex?.InnerException ?? ex;
448436
}
449437
return DependsOn.GetThrownException();
450438
}
@@ -707,33 +695,6 @@ protected void RaiseOnData(TData data)
707695
}
708696
}
709697

710-
static class TaskBaseExtensions
711-
{
712-
public static T Schedule<T>(this T task, ITaskManager taskManager)
713-
where T : ITask
714-
{
715-
return taskManager.Schedule(task);
716-
}
717-
718-
public static T ScheduleUI<T>(this T task, ITaskManager taskManager)
719-
where T : ITask
720-
{
721-
return taskManager.ScheduleUI(task);
722-
}
723-
724-
public static T ScheduleExclusive<T>(this T task, ITaskManager taskManager)
725-
where T : ITask
726-
{
727-
return taskManager.ScheduleExclusive(task);
728-
}
729-
730-
public static T ScheduleConcurrent<T>(this T task, ITaskManager taskManager)
731-
where T : ITask
732-
{
733-
return taskManager.ScheduleConcurrent(task);
734-
}
735-
}
736-
737698
public enum TaskAffinity
738699
{
739700
Concurrent,

0 commit comments

Comments
 (0)