Skip to content

Commit

Permalink
Removed obsoleted members.
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed May 28, 2024
1 parent 5400f18 commit 7fc1754
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 348 deletions.
2 changes: 0 additions & 2 deletions Epoxy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
nuget.config = nuget.config
README.ja.md = README.ja.md
README.md = README.md
test-templates-nuget.config = test-templates-nuget.config
test-templates.bat = test-templates.bat
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "playground", "playground", "{21C50AF6-746E-4FA9-9058-AF2301B23ED8}"
Expand Down
1 change: 1 addition & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ Apache-v2
* Xamarin Formsを廃止。
* テンプレートプロジェクトを廃止。
* まだしばらくは新規プロジェクト生成として機能すると思いますが、更新されません。
* 互換性の為に残されていたObsoleteメンバーを削除。
* 1.14.0:
* Avalonia 11で、XAMLからEpoxyを参照する際の名前空間にURLを指定可能にしました。
`xmlns:epoxy="https://github.com/kekyo/Epoxy"` のように指定できます。
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,7 @@ Apache-v2
* Deprecated Xamarin Forms.
* Deprecated Template Projects.
* Will still function as a new project generation for a while, but will not be updated.
* Removed Obsolete member left for compatibility.
* 1.14.0:
* In Avalonia 11, allow URLs to be specified in the namespace when referencing Epoxy from XAML.
It can be specified as `xmlns:epoxy="https://github.com/kekyo/Epoxy"`.
Expand Down
83 changes: 0 additions & 83 deletions playground/EpoxyHello.Core/Models/Reddit.cs

This file was deleted.

37 changes: 0 additions & 37 deletions playground/EpoxyHello.Core/Models/RedditPost.cs

This file was deleted.

29 changes: 0 additions & 29 deletions src/Epoxy.Core/Advanced/GlobalService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,33 +83,4 @@ public static class GlobalService
/// </summary>
public static readonly GlobalServiceAccessor Accessor =
InternalGlobalService.Accessor;

#region Obsoleted
/// <summary>
/// Static Register() method is obsoleted, will remove in future release. Use Accessor.Register() instead.
/// </summary>
[Obsolete("Static Register() method is obsoleted, will remove in future release. Use Accessor.Register() instead.")]
public static void Register(
object instance, RegisteringValidations validation = RegisteringValidations.Strict) =>
InternalGlobalService.Register(instance, validation);

/// <summary>
/// Static Unregister() method is obsoleted, will remove in future release. Use Accessor.Unregister() instead.
/// </summary>
[Obsolete("Static Unregister() method is obsoleted, will remove in future release. Use Accessor.Unregister() instead.")]
public static void Unregister(object instance) =>
InternalGlobalService.Unregister(instance);

/// <summary>
/// Static ExecuteAsync() method is obsoleted, will remove future release. Use Accessor.ExecuteAsync() instead.
/// </summary>
[Obsolete("Static ExecuteAsync() method is obsoleted, will remove future release. Use Accessor.ExecuteAsync() instead.")]
public static ValueTask ExecuteAsync<TService>(
Func<TService, ValueTask> action, bool ignoreNotPresent = false) =>
InternalGlobalService.ExecuteAsync<TService>(action, ignoreNotPresent);
[Obsolete("Static ExecuteAsync() method is obsoleted, will remove future release. Use Accessor.ExecuteAsync() instead.")]
public static ValueTask<TResult> ExecuteAsync<TService, TResult>(
Func<TService, ValueTask<TResult>> action) =>
InternalGlobalService.ExecuteAsync<TService, TResult>(action);
#endregion
}
54 changes: 0 additions & 54 deletions src/Epoxy/CommandFactoryExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,60 +28,6 @@

namespace Epoxy;

/// <summary>
/// CommandFactory class is obsoleted. Use Command.Factory instead.
/// </summary>
[Obsolete("CommandFactory class is obsoleted. Use Command.Factory instead.")]
[DebuggerStepThrough]
public static class CommandFactory
{
/// <summary>
/// CommandFactory class is obsoleted. Use Command.Factory instead.
/// </summary>
/// <param name="executeAsync">Asynchronous handler</param>
/// <returns>A Command instance</returns>
[Obsolete("CommandFactory class is obsoleted. Use Command.Factory instead.")]
public static Command Create(
Func<ValueTask> executeAsync) =>
new DelegatedCommand(() => executeAsync().AsValueTaskUnit());

/// <summary>
/// CommandFactory class is obsoleted. Use Command.Factory instead.
/// </summary>
/// <param name="executeAsync">Asynchronous handler</param>
/// <param name="canExecute">Responder for be able to execute</param>
/// <returns>A Command instance</returns>
[Obsolete("CommandFactory class is obsoleted. Use Command.Factory instead.")]
public static Command Create(
Func<ValueTask> executeAsync,
Func<bool> canExecute) =>
new DelegatedCommand(() => executeAsync().AsValueTaskUnit(), canExecute);

/// <summary>
/// CommandFactory class is obsoleted. Use Command.Factory instead.
/// </summary>
/// <typeparam name="TParameter">Handler parameter type</typeparam>
/// <param name="executeAsync">Asynchronous handler</param>
/// <returns>A Command instance</returns>
[Obsolete("CommandFactory class is obsoleted. Use Command.Factory instead.")]
public static Command Create<TParameter>(
Func<TParameter, ValueTask> executeAsync) =>
new DelegatedCommand<TParameter>(p => executeAsync(p).AsValueTaskUnit());

/// <summary>
/// CommandFactory class is obsoleted. Use Command.Factory instead.
/// </summary>
/// <typeparam name="TParameter">Handler parameter type</typeparam>
/// <param name="executeAsync">Asynchronous handler</param>
/// <param name="canExecute">Responder for be able to execute</param>
/// <returns>A Command instance</returns>
[Obsolete("CommandFactory class is obsoleted. Use Command.Factory instead.")]
public static Command Create<TParameter>(
Func<TParameter, ValueTask> executeAsync,
Func<TParameter, bool> canExecute) =>
new DelegatedCommand<TParameter>(p => executeAsync(p).AsValueTaskUnit(), canExecute);
}

/// <summary>
/// Command factory methods for ValueTask based asynchronous handler.
/// </summary>
Expand Down
26 changes: 0 additions & 26 deletions src/Epoxy/Pile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,32 +63,6 @@

namespace Epoxy;

/// <summary>
/// PileFactory class is obsoleted. Use Pile.Factory instead.
/// </summary>
[Obsolete("PileFactory class is obsoleted. Use Pile.Factory instead.")]
[DebuggerStepThrough]
public static class PileFactory
{
/// <summary>
/// PileFactory class is obsoleted. Use Pile.Factory instead.
/// </summary>
/// <returns>Pile instance</returns>
[Obsolete("PileFactory class is obsoleted. Use Pile.Factory instead.")]
public static Pile<UIElement> Create() =>
new Pile<UIElement>();

/// <summary>
/// PileFactory class is obsoleted. Use Pile.Factory instead.
/// </summary>
/// <typeparam name="TUIElement">Target control type</typeparam>
/// <returns>Pile instance</returns>
[Obsolete("PileFactory class is obsoleted. Use Pile.Factory instead.")]
public static Pile<TUIElement> Create<TUIElement>()
where TUIElement : UIElement =>
new Pile<TUIElement>();
}

/// <summary>
/// The Pile factory.
/// </summary>
Expand Down
7 changes: 0 additions & 7 deletions src/Epoxy/UIThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ public static class UIThread
public static ValueTask<bool> IsBoundAsync() =>
InternalUIThread.IsBoundAsync();

/// <summary>
/// Detects current thread context on the UI thread.
/// </summary>
[Obsolete("IsBound property is deprecated. Use IsBoundAsync() method instead.", true)]
public static bool IsBound =>
throw new NotImplementedException();

/// <summary>
/// Binds current task to the UI thread context manually.
/// </summary>
Expand Down
37 changes: 0 additions & 37 deletions src/FSharp.Epoxy/Advanced/GlobalServiceAccessorExtension.fs
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,6 @@ open System.Runtime.InteropServices
open Epoxy.Advanced
open Epoxy.Internal

[<DebuggerStepThrough>]
[<AutoOpen>]
module public GlobalServiceExtension =

type public GlobalService with

/// <summary>
/// Static register() method is obsoleted, will remove future release. Use Accessor.register() instead.
/// </summary>
[<Obsolete("Static register() method is obsoleted, will remove future release. Use Accessor.register() instead.")>]
static member register(instance: obj, [<Optional; DefaultParameterValue(RegisteringValidations.Strict)>] validation: RegisteringValidations) =
InternalGlobalService.Register(instance, validation)

/// <summary>
/// Static unregister() method is obsoleted, will remove future release. Use Accessor.unregister() instead.
/// </summary>
/// <param name="instance">Target instance</param>
[<Obsolete("Static unregister() method is obsoleted, will remove future release. Use Accessor.unregister() instead.")>]
static member unregister(instance: obj) =
InternalGlobalService.Unregister(instance)

/// <summary>
/// Static executeAsync() method is obsoleted, will remove future release. Use Accessor.executeAsync() instead.
/// </summary>
[<Obsolete("Static executeAsync() method is obsoleted, will remove future release. Use Accessor.executeAsync() instead.")>]
static member executeAsync(action: 'TService -> Async<unit>, [<Optional; DefaultParameterValue(false)>] ignoreNotPresent: bool) =
InternalGlobalService.ExecuteAsync<'TService>(action >> asyncUnitAsValueTaskVoid |> asFunc1, ignoreNotPresent)
|> valueTaskVoidAsAsyncResult

/// <summary>
/// Static executeAsync() method is obsoleted, will remove future release. Use Accessor.executeAsync() instead.
/// </summary>
[<Obsolete("Static executeAsync() method is obsoleted, will remove future release. Use Accessor.executeAsync() instead.")>]
static member executeAsync(action: 'TService -> Async<'TResult>) =
InternalGlobalService.ExecuteAsync<'TService, 'TResult>(action >> asyncAsValueTask |> asFunc1)
|> valueTaskAsAsyncResult

/// <summary>
/// GlobalService is a simple and lightweight dependency injection infrastructure.
/// </summary>
Expand Down
48 changes: 0 additions & 48 deletions src/FSharp.Epoxy/CommandFactory.fs
Original file line number Diff line number Diff line change
Expand Up @@ -34,54 +34,6 @@ module private CommandFactoryGenerator =
let inline createP0 executeAsync = new DelegatedCommand<'TParameter>(executeAsync) :> Command
let inline createP1 executeAsync canExecute = new DelegatedCommand<'TParameter>(executeAsync, canExecute) :> Command

/// <summary>
/// CommandFactory class is obsoleted. Use Command.Factory instead.
/// </summary>
[<Obsolete("CommandFactory class is obsoleted. Use Command.Factory instead.")>]
[<DebuggerStepThrough>]
[<AbstractClass>]
[<Sealed>]
type public CommandFactory =
/// <summary>
/// CommandFactory class is obsoleted. Use Command.Factory instead.
/// </summary>
/// <param name="executeAsync">Asynchronous handler</param>
/// <returns>A Command instance</returns>
[<Obsolete("CommandFactory class is obsoleted. Use Command.Factory instead.")>]
static member create executeAsync =
create0 (executeAsync >> asyncUnitAsValueTaskUnit |> asFunc0)

/// <summary>
/// CommandFactory class is obsoleted. Use Command.Factory instead.
/// </summary>
/// <param name="executeAsync">Asynchronous handler</param>
/// <param name="canExecute">Responder for be able to execute</param>
/// <returns>A Command instance</returns>
[<Obsolete("CommandFactory class is obsoleted. Use Command.Factory instead.")>]
static member create (executeAsync, canExecute) =
create1 (executeAsync >> asyncUnitAsValueTaskUnit |> asFunc0) (canExecute |> asFunc0)

/// <summary>
/// CommandFactory class is obsoleted. Use Command.Factory instead.
/// </summary>
/// <typeparam name="'TParameter">Handler parameter type</typeparam>
/// <param name="executeAsync">Asynchronous handler</param>
/// <returns>A Command instance</returns>
[<Obsolete("CommandFactory class is obsoleted. Use Command.Factory instead.")>]
static member create (executeAsync: 'TParameter -> Async<unit>) =
createP0 (executeAsync >> asyncUnitAsValueTaskUnit |> asFunc1)

/// <summary>
/// CommandFactory class is obsoleted. Use Command.Factory instead.
/// </summary>
/// <typeparam name="'TParameter">Handler parameter type</typeparam>
/// <param name="executeAsync">Asynchronous handler</param>
/// <param name="canExecute">Responder for be able to execute</param>
/// <returns>A Command instance</returns>
[<Obsolete("CommandFactory class is obsoleted. Use Command.Factory instead.")>]
static member create (executeAsync: 'TParameter -> Async<unit>, canExecute) =
createP1 (executeAsync >> asyncUnitAsValueTaskUnit |> asFunc1) (canExecute |> asFunc1)

/// <summary>
/// Command factory functions for Async&lt;unit&gt; based asynchronous handler.
/// </summary>
Expand Down
Loading

0 comments on commit 7fc1754

Please sign in to comment.