Show / Hide Table of Contents

Class Singleton<T>

Inheritance
System.Object
Singleton<T>
Namespace: Eco.Shared.Utils
Assembly: Eco.Shared.dll
Syntax
public class Singleton<T> : Object where T : Singleton<T>
Type Parameters
Name Description
T

Constructors

Singleton()

Declaration
public Singleton()

Properties

Obj

Current Singleton instance of this object.

Declaration
public static T Obj { get; }
Property Value
Type Description
T

Methods

ClearSingleton()

Declaration
public virtual void ClearSingleton()

WithTempSingleton(Func<T>, Action)

Declaration
public static void WithTempSingleton(Func<T> objCreator, Action action)
Parameters
Type Name Description
System.Func<T> objCreator
System.Action action

WithTempSingleton<TNew>(Action)

Declaration
public static void WithTempSingleton<TNew>(Action action)
    where TNew : T, new()
Parameters
Type Name Description
System.Action action
Type Parameters
Name Description
TNew

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾