diff --git a/Swan.Tiny/Configuration/PropertyDisplayAttribute.cs b/Swan.Tiny/Configuration/PropertyDisplayAttribute.cs
index c5e9d97..f80a799 100644
--- a/Swan.Tiny/Configuration/PropertyDisplayAttribute.cs
+++ b/Swan.Tiny/Configuration/PropertyDisplayAttribute.cs
@@ -9,7 +9,7 @@ namespace Swan.Configuration {
///
[AttributeUsage(AttributeTargets.Property)]
public sealed class PropertyDisplayAttribute : Attribute {
- ///
+ /*///
/// Gets or sets the name.
///
///
@@ -37,7 +37,7 @@ namespace Swan.Configuration {
///
public String GroupName {
get; set;
- }
+ }*/
///
/// Gets or sets the default value.
diff --git a/Swan.Tiny/Definitions.Types.cs b/Swan.Tiny/Definitions.Types.cs
index 6fc4742..75a31a3 100644
--- a/Swan.Tiny/Definitions.Types.cs
+++ b/Swan.Tiny/Definitions.Types.cs
@@ -62,7 +62,7 @@ namespace Swan {
#endregion
- ///
+ /*///
/// Contains all basic types, including string, date time, and all of their nullable counterparts.
///
///
@@ -90,7 +90,7 @@ namespace Swan {
///
public static IReadOnlyCollection AllNumericValueTypes {
get;
- } = new ReadOnlyCollection(BasicTypesInfo.Value.Where(kvp => kvp.Value.IsNumeric && !kvp.Value.IsNullableValueType).Select(kvp => kvp.Key).ToArray());
+ } = new ReadOnlyCollection(BasicTypesInfo.Value.Where(kvp => kvp.Value.IsNumeric && !kvp.Value.IsNullableValueType).Select(kvp => kvp.Key).ToArray());*/
///
/// Contains all basic value types. i.e. excludes string and nullables.
@@ -102,7 +102,7 @@ namespace Swan {
get;
} = new ReadOnlyCollection(BasicTypesInfo.Value.Where(kvp => kvp.Value.IsValueType).Select(kvp => kvp.Key).ToArray());
- ///
+ /*///
/// Contains all basic value types including the string type. i.e. excludes nullables.
///
///
@@ -120,6 +120,6 @@ namespace Swan {
///
public static IReadOnlyCollection AllBasicNullableValueTypes {
get;
- } = new ReadOnlyCollection(BasicTypesInfo.Value.Where(kvp => kvp.Value.IsNullableValueType).Select(kvp => kvp.Key).ToArray());
+ } = new ReadOnlyCollection(BasicTypesInfo.Value.Where(kvp => kvp.Value.IsNullableValueType).Select(kvp => kvp.Key).ToArray());*/
}
}
diff --git a/Swan.Tiny/Definitions.cs b/Swan.Tiny/Definitions.cs
index d91bed1..9e1331f 100644
--- a/Swan.Tiny/Definitions.cs
+++ b/Swan.Tiny/Definitions.cs
@@ -5,6 +5,7 @@ namespace Swan {
///
/// Contains useful constants and definitions.
///
+ // [Obsolete("NEED", false)]
public static partial class Definitions {
///
/// The MS Windows codepage 1252 encoding used in some legacy scenarios
diff --git a/Swan.Tiny/DependencyInjection/DependencyContainer.cs b/Swan.Tiny/DependencyInjection/DependencyContainer.cs
index efbe114..6dbf95a 100644
--- a/Swan.Tiny/DependencyInjection/DependencyContainer.cs
+++ b/Swan.Tiny/DependencyInjection/DependencyContainer.cs
@@ -10,12 +10,12 @@ namespace Swan.DependencyInjection {
///
///
public partial class DependencyContainer : IDisposable {
- private readonly Object _autoRegisterLock = new Object();
+ /*private readonly Object _autoRegisterLock = new Object();*/
private Boolean _disposed;
- static DependencyContainer() {
- }
+ /*static DependencyContainer() {
+ }*/
///
/// Initializes a new instance of the class.
@@ -25,7 +25,7 @@ namespace Swan.DependencyInjection {
_ = this.Register(this);
}
- private DependencyContainer(DependencyContainer parent) : this() => this.Parent = parent;
+ /*private DependencyContainer(DependencyContainer parent) : this() => this.Parent = parent;*/
///
/// Lazy created Singleton instance of the container for simple scenarios.
@@ -55,15 +55,15 @@ namespace Swan.DependencyInjection {
GC.SuppressFinalize(this);
}
- ///
+ /*///
/// Gets the child container.
///
/// A new instance of the class.
- public DependencyContainer GetChildContainer() => new DependencyContainer(this);
+ public DependencyContainer GetChildContainer() => new DependencyContainer(this);*/
#region Registration
- ///
+ /*///
/// Attempt to automatically register all non-generic classes and interfaces in the current app domain.
/// Types will only be registered if they pass the supplied registration predicate.
///
@@ -138,7 +138,7 @@ namespace Swan.DependencyInjection {
/// Type to instantiate that implements RegisterType.
/// Name of registration.
/// RegisterOptions for fluent API.
- public RegisterOptions Register(Type registerType, Type registerImplementation, String name = "") => this.RegisteredTypes.Register(registerType, name, GetDefaultObjectFactory(registerType, registerImplementation));
+ public RegisterOptions Register(Type registerType, Type registerImplementation, String name = "") => this.RegisteredTypes.Register(registerType, name, GetDefaultObjectFactory(registerType, registerImplementation));*/
///
/// Creates/replaces a named container class registration with a specific, strong referenced, instance.
@@ -149,7 +149,7 @@ namespace Swan.DependencyInjection {
/// RegisterOptions for fluent API.
public RegisterOptions Register(Type registerType, Object instance, String name = "") => this.RegisteredTypes.Register(registerType, name, new InstanceFactory(registerType, registerType, instance));
- ///
+ /*///
/// Creates/replaces a named container class registration with a specific, strong referenced, instance.
///
/// Type to register.
@@ -183,7 +183,7 @@ namespace Swan.DependencyInjection {
/// Type to instantiate that implements RegisterType.
/// Name of registration.
/// RegisterOptions for fluent API.
- public RegisterOptions Register(String name = "") where TRegister : class where TRegisterImplementation : class, TRegister => this.Register(typeof(TRegister), typeof(TRegisterImplementation), name);
+ public RegisterOptions Register(String name = "") where TRegister : class where TRegisterImplementation : class, TRegister => this.Register(typeof(TRegister), typeof(TRegisterImplementation), name);*/
///
/// Creates/replaces a named container class registration with a specific, strong referenced, instance.
@@ -192,9 +192,10 @@ namespace Swan.DependencyInjection {
/// Instance of RegisterType to register.
/// Name of registration.
/// RegisterOptions for fluent API.
+ // [Obsolete("NEED", false)]
public RegisterOptions Register(TRegister instance, String name = "") where TRegister : class => this.Register(typeof(TRegister), instance, name);
- ///
+ /*///
/// Creates/replaces a named container class registration with a specific, strong referenced, instance.
///
/// Type to register.
@@ -257,13 +258,13 @@ namespace Swan.DependencyInjection {
List registerOptions = implementationTypes.Select(type => this.Register(registrationType, type, type.FullName)).ToList();
return new MultiRegisterOptions(registerOptions);
- }
+ }*/
#endregion
#region Unregistration
- ///
+ /*///
/// Remove a named container class registration.
///
/// Type to unregister.
@@ -277,7 +278,7 @@ namespace Swan.DependencyInjection {
/// Type to unregister.
/// Name of registration.
/// true if the registration is successfully found and removed; otherwise, false.
- public Boolean Unregister(Type registerType, String name = "") => this.RegisteredTypes.RemoveRegistration(new TypeRegistration(registerType, name));
+ public Boolean Unregister(Type registerType, String name = "") => this.RegisteredTypes.RemoveRegistration(new TypeRegistration(registerType, name));*/
#endregion
@@ -294,6 +295,7 @@ namespace Swan.DependencyInjection {
/// Resolution options.
/// Instance of type.
/// Unable to resolve the type.
+ // [Obsolete("NEED", false)]
public Object Resolve(Type resolveType, String name = null, DependencyContainerResolveOptions options = null) => this.RegisteredTypes.ResolveInternal(new TypeRegistration(resolveType, name), options ?? DependencyContainerResolveOptions.Default);
///
@@ -307,6 +309,7 @@ namespace Swan.DependencyInjection {
/// Resolution options.
/// Instance of type.
/// Unable to resolve the type.
+ // [Obsolete("NEED", false)]
public TResolveType Resolve(String name = null, DependencyContainerResolveOptions options = null) where TResolveType : class => (TResolveType)this.Resolve(typeof(TResolveType), name, options);
///
@@ -321,6 +324,7 @@ namespace Swan.DependencyInjection {
///
/// Bool indicating whether the type can be resolved.
///
+ // [Obsolete("NEED", false)]
public Boolean CanResolve(Type resolveType, String name = null, DependencyContainerResolveOptions options = null) => this.RegisteredTypes.CanResolve(new TypeRegistration(resolveType, name), options);
///
@@ -335,9 +339,10 @@ namespace Swan.DependencyInjection {
/// Name of registration.
/// Resolution options.
/// Bool indicating whether the type can be resolved.
+ // [Obsolete("NEED", false)]
public Boolean CanResolve(String name = null, DependencyContainerResolveOptions options = null) where TResolveType : class => this.CanResolve(typeof(TResolveType), name, options);
- ///
+ /*///
/// Attempts to resolve a type using the default options.
///
/// Type to resolve.
@@ -508,7 +513,7 @@ namespace Swan.DependencyInjection {
// Catch any resolution errors and ignore them
}
}
- }
+ }*/
#endregion
@@ -532,7 +537,7 @@ namespace Swan.DependencyInjection {
return true;
}
- private static Boolean IsIgnoredAssembly(Assembly assembly) {
+ /*private static Boolean IsIgnoredAssembly(Assembly assembly) {
// TODO - find a better way to remove "system" assemblies from the auto registration
List> ignoreChecks = new List>
{
@@ -568,7 +573,7 @@ namespace Swan.DependencyInjection {
return ignoreChecks.Any(check => check(type));
}
- private static ObjectFactoryBase GetDefaultObjectFactory(Type registerType, Type registerImplementation) => registerType.IsInterface || registerType.IsAbstract ? (ObjectFactoryBase)new SingletonFactory(registerType, registerImplementation) : new MultiInstanceFactory(registerType, registerImplementation);
+ private static ObjectFactoryBase GetDefaultObjectFactory(Type registerType, Type registerImplementation) => registerType.IsInterface || registerType.IsAbstract ? (ObjectFactoryBase)new SingletonFactory(registerType, registerImplementation) : new MultiInstanceFactory(registerType, registerImplementation);*/
#endregion
}
diff --git a/Swan.Tiny/DependencyInjection/DependencyContainerRegistrationException.cs b/Swan.Tiny/DependencyInjection/DependencyContainerRegistrationException.cs
index 38dfae6..422a3e5 100644
--- a/Swan.Tiny/DependencyInjection/DependencyContainerRegistrationException.cs
+++ b/Swan.Tiny/DependencyInjection/DependencyContainerRegistrationException.cs
@@ -10,15 +10,15 @@ namespace Swan.DependencyInjection {
public class DependencyContainerRegistrationException : Exception {
private const String ConvertErrorText = "Cannot convert current registration of {0} to {1}";
private const String RegisterErrorText = "Cannot register type {0} - abstract classes or interfaces are not valid implementation types for {1}.";
- private const String ErrorText = "Duplicate implementation of type {0} found ({1}).";
+ /*private const String ErrorText = "Duplicate implementation of type {0} found ({1}).";*/
- ///
+ /*///
/// Initializes a new instance of the class.
///
/// Type of the register.
/// The types.
public DependencyContainerRegistrationException(Type registerType, IEnumerable types) : base(String.Format(ErrorText, registerType, GetTypesString(types))) {
- }
+ }*/
///
/// Initializes a new instance of the class.
@@ -29,6 +29,6 @@ namespace Swan.DependencyInjection {
public DependencyContainerRegistrationException(Type type, String method, Boolean isTypeFactory = false) : base(isTypeFactory ? String.Format(RegisterErrorText, type.FullName, method) : String.Format(ConvertErrorText, type.FullName, method)) {
}
- private static String GetTypesString(IEnumerable types) => String.Join(",", types.Select(type => type.FullName));
+ /*private static String GetTypesString(IEnumerable types) => String.Join(",", types.Select(type => type.FullName));*/
}
}
\ No newline at end of file
diff --git a/Swan.Tiny/DependencyInjection/DependencyContainerResolveOptions.cs b/Swan.Tiny/DependencyInjection/DependencyContainerResolveOptions.cs
index 4bf2546..1d7fd6b 100644
--- a/Swan.Tiny/DependencyInjection/DependencyContainerResolveOptions.cs
+++ b/Swan.Tiny/DependencyInjection/DependencyContainerResolveOptions.cs
@@ -84,7 +84,7 @@ namespace Swan.DependencyInjection {
Fail,
}
- ///
+ /*///
/// Enumerates duplicate definition actions.
///
public enum DependencyContainerDuplicateImplementationAction {
@@ -102,5 +102,5 @@ namespace Swan.DependencyInjection {
/// The fail
///
Fail,
- }
+ }*/
}
\ No newline at end of file
diff --git a/Swan.Tiny/DependencyInjection/ObjectFactoryBase.cs b/Swan.Tiny/DependencyInjection/ObjectFactoryBase.cs
index d2189ee..89a43f1 100644
--- a/Swan.Tiny/DependencyInjection/ObjectFactoryBase.cs
+++ b/Swan.Tiny/DependencyInjection/ObjectFactoryBase.cs
@@ -107,8 +107,7 @@ namespace Swan.DependencyInjection {
public override Type CreatesType => this._registerImplementation;
- public override ObjectFactoryBase SingletonVariant =>
- new SingletonFactory(this._registerType, this._registerImplementation);
+ public override ObjectFactoryBase SingletonVariant => new SingletonFactory(this._registerType, this._registerImplementation);
public override ObjectFactoryBase MultiInstanceVariant => this;
@@ -130,9 +129,7 @@ namespace Swan.DependencyInjection {
private readonly Func, Object> _factory;
- public DelegateFactory(
- Type registerType,
- Func, Object> factory) {
+ public DelegateFactory( Type registerType, Func, Object> factory) {
this._factory = factory ?? throw new ArgumentNullException(nameof(factory));
this._registerType = registerType;
@@ -316,13 +313,9 @@ namespace Swan.DependencyInjection {
public override ObjectFactoryBase SingletonVariant => this;
- public override ObjectFactoryBase MultiInstanceVariant =>
- new MultiInstanceFactory(this._registerType, this._registerImplementation);
+ public override ObjectFactoryBase MultiInstanceVariant => new MultiInstanceFactory(this._registerType, this._registerImplementation);
- public override Object GetObject(
- Type requestedType,
- DependencyContainer container,
- DependencyContainerResolveOptions options) {
+ public override Object GetObject( Type requestedType, DependencyContainer container, DependencyContainerResolveOptions options) {
if(options.ConstructorParameters.Count != 0) {
throw new ArgumentException("Cannot specify parameters for singleton types");
}
@@ -336,10 +329,7 @@ namespace Swan.DependencyInjection {
return this._current;
}
- public override ObjectFactoryBase GetFactoryForChildContainer(
- Type type,
- DependencyContainer parent,
- DependencyContainer child) {
+ public override ObjectFactoryBase GetFactoryForChildContainer( Type type, DependencyContainer parent, DependencyContainer child) {
// We make sure that the singleton is constructed before the child container takes the factory.
// Otherwise the results would vary depending on whether or not the parent container had resolved
// the type before the child container does.
diff --git a/Swan.Tiny/DependencyInjection/RegisterOptions.cs b/Swan.Tiny/DependencyInjection/RegisterOptions.cs
index 4c83ed2..b54c378 100644
--- a/Swan.Tiny/DependencyInjection/RegisterOptions.cs
+++ b/Swan.Tiny/DependencyInjection/RegisterOptions.cs
@@ -20,7 +20,7 @@ namespace Swan.DependencyInjection {
this._registration = registration;
}
- ///
+ /*///
/// Make registration a singleton (single instance) if possible.
///
/// A registration options for fluent API.
@@ -78,14 +78,14 @@ namespace Swan.DependencyInjection {
}
return this._registeredTypes.AddUpdateRegistration(this._registration, currentFactory.StrongReferenceVariant);
- }
+ }*/
}
- ///
+ /*///
/// Registration options for "fluent" API when registering multiple implementations.
///
public sealed class MultiRegisterOptions {
- private IEnumerable _registerOptions;
+ /*private IEnumerable _registerOptions;
///
/// Initializes a new instance of the class.
@@ -113,7 +113,6 @@ namespace Swan.DependencyInjection {
return this;
}
- private IEnumerable ExecuteOnAllRegisterOptions(
- Func action) => this._registerOptions.Select(action).ToList();
- }
+ private IEnumerable ExecuteOnAllRegisterOptions( Func action) => this._registerOptions.Select(action).ToList();
+ }*/
}
\ No newline at end of file
diff --git a/Swan.Tiny/DependencyInjection/TypesConcurrentDictionary.cs b/Swan.Tiny/DependencyInjection/TypesConcurrentDictionary.cs
index 143ffb1..18fddf4 100644
--- a/Swan.Tiny/DependencyInjection/TypesConcurrentDictionary.cs
+++ b/Swan.Tiny/DependencyInjection/TypesConcurrentDictionary.cs
@@ -24,7 +24,7 @@ namespace Swan.DependencyInjection {
/// The built object.
public delegate Object ObjectConstructor(params Object?[] parameters);
- internal IEnumerable
///
+ // [Obsolete("NEED", false)]
public class HighResolutionTimer : Stopwatch {
///
/// Initializes a new instance of the class.
@@ -22,9 +23,9 @@ namespace Swan.Diagnostics {
///
public static Double MicrosecondsPerTick { get; } = 1000000d / Frequency;
- ///
+ /*///
/// Gets the elapsed microseconds.
///
- public Int64 ElapsedMicroseconds => (Int64)(this.ElapsedTicks * MicrosecondsPerTick);
+ public Int64 ElapsedMicroseconds => (Int64)(this.ElapsedTicks * MicrosecondsPerTick);*/
}
}
diff --git a/Swan.Tiny/Enums.cs b/Swan.Tiny/Enums.cs
index a586509..6af0055 100644
--- a/Swan.Tiny/Enums.cs
+++ b/Swan.Tiny/Enums.cs
@@ -1,7 +1,10 @@
-namespace Swan {
+using System;
+
+namespace Swan {
///
/// Enumeration of Operating Systems.
///
+ // [Obsolete("NEED", false)]
public enum OperatingSystem {
///
/// Unknown OS
diff --git a/Swan.Tiny/Extensions.ByteArrays.cs b/Swan.Tiny/Extensions.ByteArrays.cs
index 5abc946..584e8b3 100644
--- a/Swan.Tiny/Extensions.ByteArrays.cs
+++ b/Swan.Tiny/Extensions.ByteArrays.cs
@@ -12,7 +12,7 @@ namespace Swan {
/// Provides various extension methods for byte arrays and streams.
///
public static class ByteArrayExtensions {
- ///
+ /*///
/// Converts an array of bytes to its lower-case, hexadecimal representation.
///
/// The bytes.
@@ -43,7 +43,7 @@ namespace Swan {
/// A string of hexadecimal pairs separated by hyphens, where each pair represents
/// the corresponding element in value; for example, "7F-2C-4A-00".
///
- public static String ToDashedHex(this Byte[] bytes) => BitConverter.ToString(bytes);
+ public static String ToDashedHex(this Byte[] bytes) => BitConverter.ToString(bytes);*/
///
/// Converts an array of bytes to a base-64 encoded string.
@@ -70,7 +70,7 @@ namespace Swan {
return Enumerable.Range(0, @this.Length / 2).Select(x => Convert.ToByte(@this.Substring(x * 2, 2), 16)).ToArray();
}
- ///
+ /*///
/// Gets the bit value at the given offset.
///
/// The b.
@@ -493,6 +493,6 @@ namespace Swan {
}
return $"{(addPrefix ? "0x" : String.Empty)}{sb}";
- }
+ }*/
}
}
diff --git a/Swan.Tiny/Extensions.Dictionaries.cs b/Swan.Tiny/Extensions.Dictionaries.cs
index 273e9e8..7f3886c 100644
--- a/Swan.Tiny/Extensions.Dictionaries.cs
+++ b/Swan.Tiny/Extensions.Dictionaries.cs
@@ -65,7 +65,7 @@ namespace Swan {
return dict[key];
}
- ///
+ /*///
/// Executes the item action for each element in the Dictionary.
///
/// The type of the key.
@@ -81,6 +81,6 @@ namespace Swan {
foreach(KeyValuePair kvp in dict) {
itemAction(kvp.Key, kvp.Value);
}
- }
+ }*/
}
}
\ No newline at end of file
diff --git a/Swan.Tiny/Extensions.Functional.cs b/Swan.Tiny/Extensions.Functional.cs
index e6d8491..76359ef 100644
--- a/Swan.Tiny/Extensions.Functional.cs
+++ b/Swan.Tiny/Extensions.Functional.cs
@@ -7,7 +7,7 @@ namespace Swan {
/// Functional programming extension methods.
///
public static class FunctionalExtensions {
- ///
+ /*///
/// Whens the specified condition.
///
/// The type of IQueryable.
@@ -38,7 +38,7 @@ namespace Swan {
}
return condition() ? fn(list) : list;
- }
+ }*/
///
/// Whens the specified condition.
@@ -73,7 +73,7 @@ namespace Swan {
return condition() ? fn(list) : list;
}
- ///
+ /*///
/// Adds the value when the condition is true.
///
/// The type of IList element.
@@ -168,6 +168,6 @@ namespace Swan {
}
return list;
- }
+ }*/
}
}
\ No newline at end of file
diff --git a/Swan.Tiny/Extensions.Reflection.cs b/Swan.Tiny/Extensions.Reflection.cs
index 8953aae..262e711 100644
--- a/Swan.Tiny/Extensions.Reflection.cs
+++ b/Swan.Tiny/Extensions.Reflection.cs
@@ -21,7 +21,7 @@ namespace Swan {
#region Assembly Extensions
- ///
+ /*///
/// Gets all types within an assembly in a safe manner.
///
/// The assembly.
@@ -39,7 +39,7 @@ namespace Swan {
} catch(ReflectionTypeLoadException e) {
return e.Types.Where(t => t != null);
}
- }
+ }*/
#endregion
@@ -61,7 +61,7 @@ namespace Swan {
return type.IsValueType ? Activator.CreateInstance(type) : default;
}
- ///
+ /*///
/// Determines whether this type is compatible with ICollection.
///
/// The type.
@@ -117,7 +117,7 @@ namespace Swan {
.Where(mi => mi.GetParameters().Select(pi => pi.ParameterType).SequenceEqual(parameterTypes)).ToList();
return methods.Count > 1 ? throw new AmbiguousMatchException() : methods.FirstOrDefault();
- }
+ }*/
///
/// Determines whether [is i enumerable request].
@@ -281,7 +281,7 @@ namespace Swan {
return true;
}
- ///
+ /*///
/// Gets property actual value or PropertyDisplayAttribute.DefaultValue if presented.
///
/// If the PropertyDisplayAttribute.Format value is presented, the property value
@@ -312,7 +312,7 @@ namespace Swan {
} catch {
return null;
}
- }
+ }*/
///
/// Gets a MethodInfo from a Property Get method.
@@ -368,7 +368,7 @@ namespace Swan {
return false;
}
- ///
+ /*///
/// Creates a property proxy that stores getter and setter delegates.
///
/// The property information.
@@ -384,7 +384,7 @@ namespace Swan {
Type genericType = typeof(PropertyProxy<,>).MakeGenericType(@this.DeclaringType!, @this.PropertyType);
return Activator.CreateInstance(genericType, @this) as IPropertyProxy;
- }
+ }*/
///
/// Convert a object to a boolean.
@@ -395,7 +395,7 @@ namespace Swan {
///
public static Boolean ToBoolean(this Object value) => value.ToStringInvariant().ToBoolean();
- private static String ConvertObjectAndFormat(Type propertyType, Object value, String format) =>
+ /*private static String ConvertObjectAndFormat(Type propertyType, Object value, String format) =>
propertyType == typeof(DateTime) || propertyType == typeof(DateTime?)
? Convert.ToDateTime(value, CultureInfo.InvariantCulture).ToString(format)
: propertyType == typeof(Int32) || propertyType == typeof(Int32?)
@@ -406,6 +406,6 @@ namespace Swan {
? Convert.ToDouble(value, CultureInfo.InvariantCulture).ToString(format)
: propertyType == typeof(Byte) || propertyType == typeof(Byte?)
? Convert.ToByte(value, CultureInfo.InvariantCulture).ToString(format)
- : value?.ToString() ?? String.Empty;
+ : value?.ToString() ?? String.Empty;*/
}
}
diff --git a/Swan.Tiny/Extensions.Strings.cs b/Swan.Tiny/Extensions.Strings.cs
index e8bf398..4773737 100644
--- a/Swan.Tiny/Extensions.Strings.cs
+++ b/Swan.Tiny/Extensions.Strings.cs
@@ -16,11 +16,11 @@ namespace Swan {
private const RegexOptions StandardRegexOptions = RegexOptions.Multiline | RegexOptions.Compiled | RegexOptions.CultureInvariant;
- private static readonly String[] ByteSuffixes = { "B", "KB", "MB", "GB", "TB" };
+ /*private static readonly String[] ByteSuffixes = { "B", "KB", "MB", "GB", "TB" };*/
private static readonly Lazy SplitLinesRegex = new Lazy(() => new Regex("\r\n|\r|\n", StandardRegexOptions));
- private static readonly Lazy UnderscoreRegex = new Lazy(() => new Regex(@"_", StandardRegexOptions));
+ /*private static readonly Lazy UnderscoreRegex = new Lazy(() => new Regex(@"_", StandardRegexOptions));
private static readonly Lazy CamelCaseRegEx = new Lazy(() => new Regex(@"[a-z][A-Z]", StandardRegexOptions));
@@ -29,7 +29,7 @@ namespace Swan {
return x[0] + " " + x[1..];
});
- private static readonly Lazy InvalidFilenameChars = new Lazy(() => Path.GetInvalidFileNameChars().Select(c => c.ToString()).ToArray());
+ private static readonly Lazy InvalidFilenameChars = new Lazy(() => Path.GetInvalidFileNameChars().Select(c => c.ToString()).ToArray());*/
#endregion
@@ -69,6 +69,7 @@ namespace Swan {
/// A string that represents the current object.
///
/// input.
+ // [Obsolete("NEED", false)]
public static String RemoveControlCharsExcept(this String value, params Char[]? excludeChars) {
if(value == null) {
throw new ArgumentNullException(nameof(value));
@@ -81,7 +82,7 @@ namespace Swan {
return new String(value.Where(c => Char.IsControl(c) == false || excludeChars.Contains(c)).ToArray());
}
- ///
+ /*///
/// Removes all control characters from a string, including new line sequences.
///
/// The input.
@@ -95,7 +96,7 @@ namespace Swan {
/// The object.
/// if set to true format the output.
/// A that represents the current object.
- public static String ToJson(this Object @this, Boolean format = true) => @this == null ? String.Empty : Json.Serialize(@this, format);
+ public static String ToJson(this Object @this, Boolean format = true) => @this == null ? String.Empty : Json.Serialize(@this, format);*/
///
/// Returns text representing the properties of the specified object in a human-readable format.
@@ -104,6 +105,7 @@ namespace Swan {
///
/// The object.
/// A that represents the current object.
+ // [Obsolete("NEED", false)]
public static String Stringify(this Object @this) {
if(@this == null) {
return "(null)";
@@ -147,6 +149,7 @@ namespace Swan {
/// The start index.
/// The length.
/// Retrieves a substring from this instance.
+ // [Obsolete("NEED", false)]
public static String SliceLength(this String @this, Int32 startIndex, Int32 length) {
if(@this == null) {
return String.Empty;
@@ -168,7 +171,7 @@ namespace Swan {
///
public static String[] ToLines(this String @this) => @this == null ? Array.Empty() : SplitLinesRegex.Value.Split(@this);
- ///
+ /*///
/// Humanizes (make more human-readable) an identifier-style string
/// in either camel case or snake case. For example, CamelCase will be converted to
/// Camel Case and Snake_Case will be converted to Snake Case.
@@ -203,7 +206,7 @@ namespace Swan {
String stringValue => stringValue.Humanize(),
Boolean boolValue => boolValue.Humanize(),
_ => value.Stringify()
- };
+ };*/
///
/// Indents the specified multi-line text with the given amount of leading spaces
@@ -212,6 +215,7 @@ namespace Swan {
/// The text.
/// The spaces.
/// A that represents the current object.
+ // [Obsolete("NEED", false)]
public static String Indent(this String value, Int32 spaces = 4) {
if(value == null) {
value = String.Empty;
@@ -267,7 +271,7 @@ namespace Swan {
return Tuple.Create(lineIndex + 1, colNumber);
}
- ///
+ /*///
/// Makes the file name system safe.
///
/// The s.
@@ -359,6 +363,6 @@ namespace Swan {
///
/// The c.
/// Converted integer.
- public static Int32 Hex2Int(this Char value) => value >= '0' && value <= '9' ? value - '0' : value >= 'A' && value <= 'F' ? value - 'A' + 10 : value >= 'a' && value <= 'f' ? value - 'a' + 10 : -1;
+ public static Int32 Hex2Int(this Char value) => value >= '0' && value <= '9' ? value - '0' : value >= 'A' && value <= 'F' ? value - 'A' + 10 : value >= 'a' && value <= 'f' ? value - 'a' + 10 : -1;*/
}
}
diff --git a/Swan.Tiny/Extensions.ValueTypes.cs b/Swan.Tiny/Extensions.ValueTypes.cs
index c509011..7c8be30 100644
--- a/Swan.Tiny/Extensions.ValueTypes.cs
+++ b/Swan.Tiny/Extensions.ValueTypes.cs
@@ -9,6 +9,7 @@ namespace Swan {
/// Provides various extension methods for value types and structs.
///
public static class ValueTypeExtensions {
+
///
/// Clamps the specified value between the minimum and the maximum.
///
@@ -17,6 +18,7 @@ namespace Swan {
/// The minimum.
/// The maximum.
/// A value that indicates the relative order of the objects being compared.
+ // [Obsolete("NEED", false)]
public static T Clamp(this T @this, T min, T max) where T : struct, IComparable => @this.CompareTo(min) < 0 ? min : @this.CompareTo(max) > 0 ? max : @this;
///
@@ -26,8 +28,9 @@ namespace Swan {
/// The minimum.
/// The maximum.
/// A value that indicates the relative order of the objects being compared.
+ // [Obsolete("NEED",false)]
public static Int32 Clamp(this Int32 @this, Int32 min, Int32 max) => @this < min ? min : (@this > max ? max : @this);
-
+ /*
///
/// Determines whether the specified value is between a minimum and a maximum value.
///
@@ -131,5 +134,6 @@ namespace Swan {
return data;
}
+ */
}
}
\ No newline at end of file
diff --git a/Swan.Tiny/Extensions.cs b/Swan.Tiny/Extensions.cs
index 0f67daa..3e30c3c 100644
--- a/Swan.Tiny/Extensions.cs
+++ b/Swan.Tiny/Extensions.cs
@@ -27,7 +27,7 @@ namespace Swan {
///
public static Int32 CopyPropertiesTo(this T source, Object? target, params String[]? ignoreProperties) where T : class => ObjectMapper.Copy(source, target, GetCopyableProperties(target), ignoreProperties);
- ///
+ /*///
/// Iterates over the public, instance, readable properties of the source and
/// tries to write a compatible value to a public, instance, writable property in the destination.
///
@@ -37,7 +37,7 @@ namespace Swan {
///
/// Number of properties that were successfully copied.
///
- public static Int32 CopyOnlyPropertiesTo(this Object source, Object target, params String[]? propertiesToCopy) => ObjectMapper.Copy(source, target, propertiesToCopy);
+ public static Int32 CopyOnlyPropertiesTo(this Object source, Object target, params String[]? propertiesToCopy) => ObjectMapper.Copy(source, target, propertiesToCopy);*/
///
/// Copies the properties to new instance of T.
@@ -60,7 +60,7 @@ namespace Swan {
return target;
}
- ///
+ /*///
/// Copies the only properties to new instance of T.
///
/// Object Type.
@@ -161,7 +161,7 @@ namespace Swan {
}
throw new AggregateException(exceptions);
- }
+ }*/
///
/// Gets the copyable properties.
diff --git a/Swan.Tiny/Formatters/Json.SerializerOptions.cs b/Swan.Tiny/Formatters/Json.SerializerOptions.cs
index ff4c9bf..91ba468 100644
--- a/Swan.Tiny/Formatters/Json.SerializerOptions.cs
+++ b/Swan.Tiny/Formatters/Json.SerializerOptions.cs
@@ -15,8 +15,7 @@ namespace Swan.Formatters {
/// serializer such as the beloved Json.NET.
///
public class SerializerOptions {
- private static readonly ConcurrentDictionary, MemberInfo>>
- TypeCache = new ConcurrentDictionary, MemberInfo>>();
+ private static readonly ConcurrentDictionary, MemberInfo>> TypeCache = new ConcurrentDictionary, MemberInfo>>();
private readonly String[]? _includeProperties;
private readonly String[]? _excludeProperties;
diff --git a/Swan.Tiny/Formatters/Json.cs b/Swan.Tiny/Formatters/Json.cs
index c28d76f..9fad334 100644
--- a/Swan.Tiny/Formatters/Json.cs
+++ b/Swan.Tiny/Formatters/Json.cs
@@ -99,7 +99,7 @@ namespace Swan.Formatters {
///
public static String Serialize(Object? obj, Boolean format = false, String? typeSpecifier = null, Boolean includeNonPublic = false, String[]? includedNames = null, params String[] excludedNames) => Serialize(obj, format, typeSpecifier, includeNonPublic, includedNames, excludedNames, null, JsonSerializerCase.None);
- ///
+ /*///
/// Serializes the specified object into a JSON string.
///
/// The object.
@@ -109,7 +109,7 @@ namespace Swan.Formatters {
///
/// A that represents the current object.
///
- public static String Serialize(Object? obj, JsonSerializerCase jsonSerializerCase, Boolean format = false, String? typeSpecifier = null) => Serialize(obj, format, typeSpecifier, false, null, null, null, jsonSerializerCase);
+ public static String Serialize(Object? obj, JsonSerializerCase jsonSerializerCase, Boolean format = false, String? typeSpecifier = null) => Serialize(obj, format, typeSpecifier, false, null, null, null, jsonSerializerCase);*/
///
/// Serializes the specified object into a JSON string.
@@ -145,7 +145,7 @@ namespace Swan.Formatters {
///
public static String Serialize(Object? obj, SerializerOptions options) => Serializer.Serialize(obj, 0, options);
- ///
+ /*///
/// Serializes the specified object only including the specified property names.
///
/// The object.
@@ -205,7 +205,7 @@ namespace Swan.Formatters {
/// }
///
///
- public static String SerializeExcluding(Object? obj, Boolean format, params String[] excludeNames) => Serialize(obj, new SerializerOptions(format, null, null, excludeNames));
+ public static String SerializeExcluding(Object? obj, Boolean format, params String[] excludeNames) => Serialize(obj, new SerializerOptions(format, null, null, excludeNames));*/
///
/// Deserializes the specified json string as either a Dictionary[string, object] or as a List[object]
@@ -258,7 +258,7 @@ namespace Swan.Formatters {
///
public static Object? Deserialize(String? json) => Deserialize(json, JsonSerializerCase.None);
- ///
+ /*///
/// Deserializes the specified JSON string and converts it to the specified object type.
/// Non-public constructors and property setters are ignored.
///
@@ -304,7 +304,7 @@ namespace Swan.Formatters {
///
/// Type of the current conversion from json result.
///
- public static Object? Deserialize(String json, Type resultType, Boolean includeNonPublic = false, JsonSerializerCase jsonSerializerCase = JsonSerializerCase.None) => Converter.FromJsonResult(Deserializer.DeserializeInternal(json), jsonSerializerCase, resultType, includeNonPublic);
+ public static Object? Deserialize(String json, Type resultType, Boolean includeNonPublic = false, JsonSerializerCase jsonSerializerCase = JsonSerializerCase.None) => Converter.FromJsonResult(Deserializer.DeserializeInternal(json), jsonSerializerCase, resultType, includeNonPublic);*/
#endregion
diff --git a/Swan.Tiny/Formatters/JsonPropertyAttribute.cs b/Swan.Tiny/Formatters/JsonPropertyAttribute.cs
index 0a569af..624b70f 100644
--- a/Swan.Tiny/Formatters/JsonPropertyAttribute.cs
+++ b/Swan.Tiny/Formatters/JsonPropertyAttribute.cs
@@ -7,7 +7,7 @@ namespace Swan.Formatters {
///
[AttributeUsage(AttributeTargets.Property)]
public sealed class JsonPropertyAttribute : Attribute {
- ///
+ /*///
/// Initializes a new instance of the class.
///
/// Name of the property.
@@ -15,7 +15,7 @@ namespace Swan.Formatters {
public JsonPropertyAttribute(String propertyName, Boolean ignored = false) {
this.PropertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName));
this.Ignored = ignored;
- }
+ }*/
///
/// Gets or sets the name of the property.
diff --git a/Swan.Tiny/Logging/ConsoleLogger.cs b/Swan.Tiny/Logging/ConsoleLogger.cs
index 6665fe6..759d40e 100644
--- a/Swan.Tiny/Logging/ConsoleLogger.cs
+++ b/Swan.Tiny/Logging/ConsoleLogger.cs
@@ -6,6 +6,7 @@ namespace Swan.Logging {
/// Represents a Console implementation of ILogger.
///
///
+ // [Obsolete("NEED", false)]
public class ConsoleLogger : TextLogger, ILogger {
///
/// Initializes a new instance of the class.
@@ -122,6 +123,7 @@ namespace Swan.Logging {
public LogLevel LogLevel { get; set; } = DebugLogger.IsDebuggerAttached ? LogLevel.Trace : LogLevel.Info;
///
+ // [Obsolete("NEED", false)]
public void Log(LogMessageReceivedEventArgs logEvent) {
// Select the writer based on the message type
TerminalWriters writer = logEvent.MessageType == LogLevel.Error ? TerminalWriters.StandardError : TerminalWriters.StandardOutput;
diff --git a/Swan.Tiny/Logging/DebugLogger.cs b/Swan.Tiny/Logging/DebugLogger.cs
index 9aeb43f..7dc4e4c 100644
--- a/Swan.Tiny/Logging/DebugLogger.cs
+++ b/Swan.Tiny/Logging/DebugLogger.cs
@@ -7,6 +7,7 @@ namespace Swan.Logging {
/// Debug console using System.Diagnostics.Debug.
///
///
+ // [Obsolete("NEED", false)]
public class DebugLogger : TextLogger, ILogger {
///
/// Initializes a new instance of the class.
@@ -35,6 +36,7 @@ namespace Swan.Logging {
public LogLevel LogLevel { get; set; } = IsDebuggerAttached ? LogLevel.Trace : LogLevel.None;
///
+ // [Obsolete("NEED", false)]
public void Log(LogMessageReceivedEventArgs logEvent) {
(String outputMessage, ConsoleColor _) = this.GetOutputAndColor(logEvent);
diff --git a/Swan.Tiny/Logging/ILogger.cs b/Swan.Tiny/Logging/ILogger.cs
index 26107a7..8710b67 100644
--- a/Swan.Tiny/Logging/ILogger.cs
+++ b/Swan.Tiny/Logging/ILogger.cs
@@ -4,6 +4,7 @@ namespace Swan.Logging {
///
/// Interface for a logger implementation.
///
+ // [Obsolete("NEED", false)]
public interface ILogger : IDisposable {
///
/// Gets the log level.
diff --git a/Swan.Tiny/Logging/LogMessageReceivedEventArgs.cs b/Swan.Tiny/Logging/LogMessageReceivedEventArgs.cs
index 97e5fa4..c8568ff 100644
--- a/Swan.Tiny/Logging/LogMessageReceivedEventArgs.cs
+++ b/Swan.Tiny/Logging/LogMessageReceivedEventArgs.cs
@@ -8,6 +8,7 @@ namespace Swan {
/// your logger of choice.
///
///
+ // [Obsolete("NEED", false)]
public class LogMessageReceivedEventArgs : EventArgs {
///
/// Initializes a new instance of the class.
diff --git a/Swan.Tiny/Logging/Logger.cs b/Swan.Tiny/Logging/Logger.cs
index 2bedf85..1f9afe3 100644
--- a/Swan.Tiny/Logging/Logger.cs
+++ b/Swan.Tiny/Logging/Logger.cs
@@ -10,11 +10,14 @@ namespace Swan.Logging {
/// loggers instances. By default, the ConsoleLogger is registered.
///
public static class Logger {
- private static readonly Object SyncLock = new Object();
+ /*private static readonly Object SyncLock = new Object();*/
+ // [Obsolete("NEED", false)]
private static readonly List Loggers = new List();
+ // [Obsolete("NEED", false)]
private static UInt64 _loggingSequence;
+ // [Obsolete("NEED", false)]
static Logger() {
if(Terminal.IsConsolePresent) {
Loggers.Add(ConsoleLogger.Instance);
@@ -25,7 +28,7 @@ namespace Swan.Logging {
}
}
- #region Standard Public API
+ /*#region Standard Public API
///
/// Registers the logger.
@@ -298,11 +301,11 @@ namespace Swan.Logging {
#endregion
- #endregion
+ #endregion*/
#region Extended Public API
- ///
+ /*///
/// Logs the specified message.
///
/// The message.
@@ -324,7 +327,7 @@ namespace Swan.Logging {
/// Name of the caller member.
/// The caller file path.
/// The caller line number.
- public static void Log(this String message, Type source, LogLevel messageType, Object extendedData = null, [CallerMemberName] String callerMemberName = "", [CallerFilePath] String callerFilePath = "", [CallerLineNumber] Int32 callerLineNumber = 0) => LogMessage(messageType, message, source?.FullName, extendedData, callerMemberName, callerFilePath, callerLineNumber);
+ public static void Log(this String message, Type source, LogLevel messageType, Object extendedData = null, [CallerMemberName] String callerMemberName = "", [CallerFilePath] String callerFilePath = "", [CallerLineNumber] Int32 callerLineNumber = 0) => LogMessage(messageType, message, source?.FullName, extendedData, callerMemberName, callerFilePath, callerLineNumber);*/
///
/// Logs an error message to the console's standard error.
@@ -335,9 +338,10 @@ namespace Swan.Logging {
/// Name of the caller member. This is automatically populated.
/// The caller file path. This is automatically populated.
/// The caller line number. This is automatically populated.
+ // [Obsolete("NEED", false)]
public static void Log(this Exception ex, String source = null, String message = null, [CallerMemberName] String callerMemberName = "", [CallerFilePath] String callerFilePath = "", [CallerLineNumber] Int32 callerLineNumber = 0) => LogMessage(LogLevel.Error, message ?? ex.Message, source ?? ex.Source, ex, callerMemberName, callerFilePath, callerLineNumber);
- ///
+ /*///
/// Logs an error message to the console's standard error.
///
/// The ex.
@@ -384,11 +388,11 @@ namespace Swan.Logging {
String message = $"{text} ({obj.GetType()}): {Environment.NewLine}{obj.Stringify().Indent(5)}";
LogMessage(LogLevel.Trace, message, source?.FullName, obj, callerMemberName, callerFilePath, callerLineNumber);
- }
+ }*/
#endregion
- private static void RemoveLogger(Func criteria) {
+ /*private static void RemoveLogger(Func criteria) {
lock(SyncLock) {
ILogger loggerInstance = Loggers.FirstOrDefault(criteria);
@@ -400,8 +404,9 @@ namespace Swan.Logging {
_ = Loggers.Remove(loggerInstance);
}
- }
+ }*/
+ // [Obsolete("NEED", false)]
private static void LogMessage(LogLevel logLevel, String message, String sourceName, Object extendedData, String callerMemberName, String callerFilePath, Int32 callerLineNumber) {
UInt64 sequence = _loggingSequence;
DateTime date = DateTime.UtcNow;
diff --git a/Swan.Tiny/Logging/TextLogger.cs b/Swan.Tiny/Logging/TextLogger.cs
index dcf97e8..56ca007 100644
--- a/Swan.Tiny/Logging/TextLogger.cs
+++ b/Swan.Tiny/Logging/TextLogger.cs
@@ -5,6 +5,7 @@ namespace Swan.Lite.Logging {
///
/// Use this class for text-based logger.
///
+ // [Obsolete("NEED", false)]
public abstract class TextLogger {
///
/// Gets or sets the logging time format.
@@ -22,6 +23,7 @@ namespace Swan.Lite.Logging {
///
/// The output message formatted and the color of the console to be used.
///
+ // [Obsolete("NEED", false)]
protected (String outputMessage, ConsoleColor color) GetOutputAndColor(LogMessageReceivedEventArgs logEvent) {
(String prefix, ConsoleColor color) = GetConsoleColorAndPrefix(logEvent.MessageType);
diff --git a/Swan.Tiny/Mappers/ObjectMap.cs b/Swan.Tiny/Mappers/ObjectMap.cs
index e30549a..beacfc6 100644
--- a/Swan.Tiny/Mappers/ObjectMap.cs
+++ b/Swan.Tiny/Mappers/ObjectMap.cs
@@ -33,7 +33,7 @@ namespace Swan.Mappers {
get;
}
- ///
+ /*///
/// Maps the property.
///
/// The type of the destination property.
@@ -104,6 +104,6 @@ namespace Swan.Mappers {
}
return sourceMembers;
- }
+ }*/
}
}
diff --git a/Swan.Tiny/Mappers/ObjectMapper.PropertyInfoComparer.cs b/Swan.Tiny/Mappers/ObjectMapper.PropertyInfoComparer.cs
index 02c1dda..3f4ff3b 100644
--- a/Swan.Tiny/Mappers/ObjectMapper.PropertyInfoComparer.cs
+++ b/Swan.Tiny/Mappers/ObjectMapper.PropertyInfoComparer.cs
@@ -1,4 +1,4 @@
-using System;
+/*using System;
using System.Collections.Generic;
using System.Reflection;
@@ -17,4 +17,4 @@ namespace Swan.Mappers {
public Int32 GetHashCode(PropertyInfo obj) => obj.Name.GetHashCode() + obj.PropertyType.Name.GetHashCode();
}
}
-}
\ No newline at end of file
+}*/
\ No newline at end of file
diff --git a/Swan.Tiny/Mappers/ObjectMapper.cs b/Swan.Tiny/Mappers/ObjectMapper.cs
index c7360b4..a200c40 100644
--- a/Swan.Tiny/Mappers/ObjectMapper.cs
+++ b/Swan.Tiny/Mappers/ObjectMapper.cs
@@ -79,17 +79,17 @@ namespace Swan.Mappers {
///
///
public partial class ObjectMapper {
- private static readonly Lazy LazyInstance = new Lazy(() => new ObjectMapper());
+ /*private static readonly Lazy LazyInstance = new Lazy(() => new ObjectMapper());
- private readonly List _maps = new List();
+ private readonly List _maps = new List();*/
- ///
+ /*///
/// Gets the current.
///
///
/// The current.
///
- public static ObjectMapper Current => LazyInstance.Value;
+ public static ObjectMapper Current => LazyInstance.Value;*/
///
/// Copies the specified source.
@@ -145,7 +145,7 @@ namespace Swan.Mappers {
return CopyInternal(target, source.ToDictionary(x => x.Key.ToLowerInvariant(), x => Tuple.Create(typeof(Object), x.Value)), propertiesToCopy, ignoreProperties);
}
- ///
+ /*///
/// Creates the map.
///
/// The type of the source.
@@ -215,7 +215,7 @@ namespace Swan.Mappers {
}
return destination;
- }
+ }*/
private static Int32 CopyInternal(Object target, Dictionary> sourceProperties, IEnumerable? propertiesToCopy, IEnumerable? ignoreProperties) {
// Filter properties
diff --git a/Swan.Tiny/Net/Dns/DnsClient.Interfaces.cs b/Swan.Tiny/Net/Dns/DnsClient.Interfaces.cs
index d869e38..631fad5 100644
--- a/Swan.Tiny/Net/Dns/DnsClient.Interfaces.cs
+++ b/Swan.Tiny/Net/Dns/DnsClient.Interfaces.cs
@@ -1,4 +1,4 @@
-using System;
+/*using System;
using System.Threading.Tasks;
using System.Collections.Generic;
@@ -93,4 +93,4 @@ namespace Swan.Net.Dns {
Task Request(DnsClientRequest request);
}
}
-}
+}*/
diff --git a/Swan.Tiny/Net/Dns/DnsClient.Request.cs b/Swan.Tiny/Net/Dns/DnsClient.Request.cs
index 8b9f396..85e9607 100644
--- a/Swan.Tiny/Net/Dns/DnsClient.Request.cs
+++ b/Swan.Tiny/Net/Dns/DnsClient.Request.cs
@@ -1,4 +1,5 @@
-#nullable enable
+/*
+#nullable enable
using Swan.Formatters;
using System;
using System.Collections.Generic;
@@ -555,4 +556,4 @@ namespace Swan.Net.Dns {
}
}
}
-}
+}*/
diff --git a/Swan.Tiny/Net/Dns/DnsClient.ResourceRecords.cs b/Swan.Tiny/Net/Dns/DnsClient.ResourceRecords.cs
index 10cf023..6b61ed4 100644
--- a/Swan.Tiny/Net/Dns/DnsClient.ResourceRecords.cs
+++ b/Swan.Tiny/Net/Dns/DnsClient.ResourceRecords.cs
@@ -1,4 +1,4 @@
-using Swan.Formatters;
+/*using Swan.Formatters;
using System;
using System.Collections.Generic;
using System.IO;
@@ -341,4 +341,4 @@ namespace Swan.Net.Dns {
}
}
}
-}
+}*/
diff --git a/Swan.Tiny/Net/Dns/DnsClient.Response.cs b/Swan.Tiny/Net/Dns/DnsClient.Response.cs
index 5799ef8..28dd312 100644
--- a/Swan.Tiny/Net/Dns/DnsClient.Response.cs
+++ b/Swan.Tiny/Net/Dns/DnsClient.Response.cs
@@ -1,4 +1,4 @@
-using Swan.Formatters;
+/*using Swan.Formatters;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -171,4 +171,4 @@ namespace Swan.Net.Dns {
}
}
}
-}
\ No newline at end of file
+}*/
\ No newline at end of file
diff --git a/Swan.Tiny/Net/Dns/DnsClient.cs b/Swan.Tiny/Net/Dns/DnsClient.cs
index d030418..cad4a0c 100644
--- a/Swan.Tiny/Net/Dns/DnsClient.cs
+++ b/Swan.Tiny/Net/Dns/DnsClient.cs
@@ -1,4 +1,4 @@
-using System;
+/*using System;
using System.Collections.Generic;
using System.Linq;
#nullable enable
@@ -62,4 +62,4 @@ namespace Swan.Net.Dns {
return request.Resolve();
}
}
-}
+}*/
diff --git a/Swan.Tiny/Net/Dns/DnsQueryException.cs b/Swan.Tiny/Net/Dns/DnsQueryException.cs
index c0f9e7f..37a4bf7 100644
--- a/Swan.Tiny/Net/Dns/DnsQueryException.cs
+++ b/Swan.Tiny/Net/Dns/DnsQueryException.cs
@@ -1,4 +1,4 @@
-#nullable enable
+/*#nullable enable
using System;
namespace Swan.Net.Dns {
@@ -26,3 +26,4 @@ namespace Swan.Net.Dns {
private static String Format(DnsClient.IDnsResponse response) => $"Invalid response received with code {response.ResponseCode}";
}
}
+*/
\ No newline at end of file
diff --git a/Swan.Tiny/Net/Dns/DnsQueryResult.cs b/Swan.Tiny/Net/Dns/DnsQueryResult.cs
index 76b8fa7..ca953cc 100644
--- a/Swan.Tiny/Net/Dns/DnsQueryResult.cs
+++ b/Swan.Tiny/Net/Dns/DnsQueryResult.cs
@@ -1,4 +1,4 @@
-namespace Swan.Net.Dns {
+/*namespace Swan.Net.Dns {
using System.Collections.Generic;
///
@@ -128,3 +128,4 @@
public IList AuthorityRecords => this._mAuthorityRecords;
}
}
+*/
\ No newline at end of file
diff --git a/Swan.Tiny/Net/Dns/DnsRecord.cs b/Swan.Tiny/Net/Dns/DnsRecord.cs
index 699e75a..8ed1f45 100644
--- a/Swan.Tiny/Net/Dns/DnsRecord.cs
+++ b/Swan.Tiny/Net/Dns/DnsRecord.cs
@@ -1,4 +1,4 @@
-using System;
+/*using System;
using System.Net;
using System.Text;
@@ -237,3 +237,4 @@ namespace Swan.Net.Dns {
}
}
}
+*/
\ No newline at end of file
diff --git a/Swan.Tiny/Net/Dns/Enums.Dns.cs b/Swan.Tiny/Net/Dns/Enums.Dns.cs
index 8b1f21c..1d3a842 100644
--- a/Swan.Tiny/Net/Dns/Enums.Dns.cs
+++ b/Swan.Tiny/Net/Dns/Enums.Dns.cs
@@ -1,4 +1,4 @@
-// ReSharper disable InconsistentNaming
+/*// ReSharper disable InconsistentNaming
namespace Swan.Net.Dns {
///
/// Enumerates the different DNS record types.
@@ -165,3 +165,4 @@ namespace Swan.Net.Dns {
NotZone,
}
}
+*/
\ No newline at end of file
diff --git a/Swan.Tiny/Net/Network.cs b/Swan.Tiny/Net/Network.cs
index e92ac24..55016ec 100644
--- a/Swan.Tiny/Net/Network.cs
+++ b/Swan.Tiny/Net/Network.cs
@@ -1,4 +1,4 @@
-using Swan.Net.Dns;
+//using Swan.Net.Dns;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -15,7 +15,7 @@ namespace Swan.Net {
/// a DNS client to query DNS records of any kind, and an NTP client.
///
public static class Network {
- ///
+ /*///
/// The DNS default port.
///
public const Int32 DnsDefaultPort = 53;
@@ -23,7 +23,7 @@ namespace Swan.Net {
///
/// The NTP default port.
///
- public const Int32 NtpDefaultPort = 123;
+ public const Int32 NtpDefaultPort = 123;*/
///
/// Gets the name of the host.
@@ -31,9 +31,10 @@ namespace Swan.Net {
///
/// The name of the host.
///
+ // [Obsolete("NEED", false)]
public static String HostName => IPGlobalProperties.GetIPGlobalProperties().HostName;
- ///
+ /*///
/// Gets the name of the network domain.
///
///
@@ -284,6 +285,6 @@ namespace Swan.Net {
return await GetNetworkTimeUtcAsync(addresses.First(), port).ConfigureAwait(false);
}
- #endregion
+ #endregion*/
}
}
diff --git a/Swan.Tiny/ProcessResult.cs b/Swan.Tiny/ProcessResult.cs
index 9703050..5106a38 100644
--- a/Swan.Tiny/ProcessResult.cs
+++ b/Swan.Tiny/ProcessResult.cs
@@ -5,6 +5,7 @@ namespace Swan {
/// Represents the text of the standard output and standard error
/// of a process, including its exit code.
///
+ // [Obsolete("NEED", false)]
public class ProcessResult {
///
/// Initializes a new instance of the class.
diff --git a/Swan.Tiny/ProcessRunner.cs b/Swan.Tiny/ProcessRunner.cs
index a429c34..22d4a95 100644
--- a/Swan.Tiny/ProcessRunner.cs
+++ b/Swan.Tiny/ProcessRunner.cs
@@ -19,6 +19,7 @@ namespace Swan {
///
/// The process data.
/// The process.
+ // [Obsolete("NEED", false)]
public delegate void ProcessDataReceivedCallback(Byte[] processData, Process process);
///
@@ -53,12 +54,13 @@ namespace Swan {
/// }
///
///
+ // [Obsolete("NEED", false)]
public static async Task GetProcessOutputAsync(String filename, String arguments = "", String? workingDirectory = null, CancellationToken cancellationToken = default) {
ProcessResult result = await GetProcessResultAsync(filename, arguments, workingDirectory, cancellationToken: cancellationToken).ConfigureAwait(false);
return result.ExitCode == 0 ? result.StandardOutput : result.StandardError;
}
- ///
+ /*///
/// Runs the process asynchronously and if the exit code is 0,
/// returns all of the standard output text. If the exit code is something other than 0
/// it returns the contents of standard error.
@@ -75,7 +77,7 @@ namespace Swan {
public static async Task GetProcessEncodedOutputAsync(String filename, String arguments = "", Encoding? encoding = null, CancellationToken cancellationToken = default) {
ProcessResult result = await GetProcessResultAsync(filename, arguments, null, encoding, cancellationToken).ConfigureAwait(false);
return result.ExitCode == 0 ? result.StandardOutput : result.StandardError;
- }
+ }*/
///
/// Executes a process asynchronously and returns the text of the standard output and standard error streams
@@ -89,6 +91,7 @@ namespace Swan {
/// Text of the standard output and standard error streams along with the exit code as a instance.
///
/// filename.
+ // [Obsolete("NEED", false)]
public static Task GetProcessResultAsync(String filename, String arguments = "", CancellationToken cancellationToken = default) => GetProcessResultAsync(filename, arguments, null, Definitions.CurrentAnsiEncoding, cancellationToken);
///
@@ -128,6 +131,7 @@ namespace Swan {
/// }
/// }
///
+ // [Obsolete("NEED", false)]
public static async Task GetProcessResultAsync(String filename, String arguments, String? workingDirectory, Encoding? encoding = null, CancellationToken cancellationToken = default) {
if(filename == null) {
throw new ArgumentNullException(nameof(filename));
@@ -163,6 +167,7 @@ namespace Swan {
///
/// Value type will be -1 for forceful termination of the process.
///
+ // [Obsolete("NEED", false)]
public static Task RunProcessAsync(String filename, String arguments, String? workingDirectory, ProcessDataReceivedCallback onOutputData, ProcessDataReceivedCallback? onErrorData, Encoding encoding, Boolean syncEvents = true, CancellationToken cancellationToken = default) {
if(filename == null) {
throw new ArgumentNullException(nameof(filename));
@@ -273,6 +278,7 @@ namespace Swan {
/// }
///
///
+ // [Obsolete("NEED", false)]
public static Task RunProcessAsync(String filename, String arguments, ProcessDataReceivedCallback onOutputData, ProcessDataReceivedCallback? onErrorData, Boolean syncEvents = true, CancellationToken cancellationToken = default) => RunProcessAsync(filename, arguments, null, onOutputData, onErrorData, Definitions.CurrentAnsiEncoding, syncEvents, cancellationToken);
///
@@ -284,6 +290,7 @@ namespace Swan {
/// if set to true [synchronize events].
/// The cancellation token.
/// Total copies stream.
+ // [Obsolete("NEED", false)]
private static Task CopyStreamAsync(Process process, Stream baseStream, ProcessDataReceivedCallback? onDataCallback, Boolean syncEvents, CancellationToken ct) => Task.Run(async () => {
// define some state variables
Byte[] swapBuffer = new Byte[2048]; // the buffer to copy data from one stream to the next
diff --git a/Swan.Tiny/Reflection/AttributeCache.cs b/Swan.Tiny/Reflection/AttributeCache.cs
index 46423fa..ccb82ab 100644
--- a/Swan.Tiny/Reflection/AttributeCache.cs
+++ b/Swan.Tiny/Reflection/AttributeCache.cs
@@ -37,7 +37,7 @@ namespace Swan.Reflection {
get;
}
- ///
+ /*///
/// Determines whether [contains] [the specified member].
///
/// The type of the attribute to be retrieved.
@@ -79,7 +79,7 @@ namespace Swan.Reflection {
}
return this.Retrieve(new Tuple(member, type), t => member.GetCustomAttributes(type, inherit));
- }
+ }*/
///
/// Gets one attribute of a specific type from a member.
@@ -98,7 +98,7 @@ namespace Swan.Reflection {
return ConvertToAttribute(attr);
}
- ///
+ /*///
/// Gets one attribute of a specific type from a generic type.
///
/// The type of the attribute.
@@ -146,7 +146,7 @@ namespace Swan.Reflection {
}
return this.PropertyTypeCache.RetrieveAllProperties(true).ToDictionary(x => x, x => this.Retrieve(x, attributeType, inherit));
- }
+ }*/
private static T ConvertToAttribute(IEnumerable attr) where T : Attribute => attr?.Any() != true ? (default!) : attr.Count() == 1 ? (T)Convert.ChangeType(attr.First(), typeof(T)) : throw new AmbiguousMatchException("Multiple custom attributes of the same type found.");
diff --git a/Swan.Tiny/Reflection/ConstructorTypeCache.cs b/Swan.Tiny/Reflection/ConstructorTypeCache.cs
index e1a42af..5627478 100644
--- a/Swan.Tiny/Reflection/ConstructorTypeCache.cs
+++ b/Swan.Tiny/Reflection/ConstructorTypeCache.cs
@@ -17,7 +17,7 @@ namespace Swan.Lite.Reflection {
///
public static Lazy DefaultCache { get; } = new Lazy(() => new ConstructorTypeCache());
- ///
+ /*///
/// Retrieves all constructors order by the number of parameters ascending.
///
/// The type to inspect.
@@ -25,7 +25,7 @@ namespace Swan.Lite.Reflection {
///
/// A collection with all the constructors in the given type.
///
- public IEnumerable> RetrieveAllConstructors(Boolean includeNonPublic = false) => this.Retrieve(GetConstructors(includeNonPublic));
+ public IEnumerable> RetrieveAllConstructors(Boolean includeNonPublic = false) => this.Retrieve(GetConstructors(includeNonPublic));*/
///
/// Retrieves all constructors order by the number of parameters ascending.
diff --git a/Swan.Tiny/Reflection/ExtendedTypeInfo.cs b/Swan.Tiny/Reflection/ExtendedTypeInfo.cs
index 020bcf9..c544177 100644
--- a/Swan.Tiny/Reflection/ExtendedTypeInfo.cs
+++ b/Swan.Tiny/Reflection/ExtendedTypeInfo.cs
@@ -235,13 +235,13 @@ namespace Swan.Reflection {
// placeholder
}
- ///
+ /*///
/// Converts this instance to its string representation,
/// trying to use the CultureInfo.InvariantCulture
/// IFormat provider if the overload is available.
///
/// The instance.
/// A that represents the current object.
- public String ToStringInvariant(T instance) => base.ToStringInvariant(instance);
+ public String ToStringInvariant(T instance) => base.ToStringInvariant(instance);*/
}
}
diff --git a/Swan.Tiny/Reflection/IPropertyProxy.cs b/Swan.Tiny/Reflection/IPropertyProxy.cs
index 169786d..9a0080b 100644
--- a/Swan.Tiny/Reflection/IPropertyProxy.cs
+++ b/Swan.Tiny/Reflection/IPropertyProxy.cs
@@ -1,4 +1,4 @@
-using System;
+/*using System;
namespace Swan.Reflection {
///
@@ -19,4 +19,4 @@ namespace Swan.Reflection {
/// The value.
void SetValue(Object instance, Object value);
}
-}
\ No newline at end of file
+}*/
\ No newline at end of file
diff --git a/Swan.Tiny/Reflection/PropertyProxy.cs b/Swan.Tiny/Reflection/PropertyProxy.cs
index f06b58e..5976ba9 100644
--- a/Swan.Tiny/Reflection/PropertyProxy.cs
+++ b/Swan.Tiny/Reflection/PropertyProxy.cs
@@ -1,4 +1,4 @@
-using System;
+/*using System;
using System.Reflection;
using System.Runtime.CompilerServices;
@@ -41,4 +41,4 @@ namespace Swan.Reflection {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void IPropertyProxy.SetValue(Object instance, Object value) => this._setter(instance as TClass, (TProperty)value);
}
-}
\ No newline at end of file
+}*/
\ No newline at end of file
diff --git a/Swan.Tiny/Reflection/PropertyTypeCache.cs b/Swan.Tiny/Reflection/PropertyTypeCache.cs
index c5ec4c6..6cfb4eb 100644
--- a/Swan.Tiny/Reflection/PropertyTypeCache.cs
+++ b/Swan.Tiny/Reflection/PropertyTypeCache.cs
@@ -16,7 +16,7 @@ namespace Swan.Reflection {
///
public static Lazy DefaultCache { get; } = new Lazy(() => new PropertyTypeCache());
- ///
+ /*///
/// Retrieves all properties.
///
/// The type to inspect.
@@ -24,7 +24,7 @@ namespace Swan.Reflection {
///
/// A collection with all the properties in the given type.
///
- public IEnumerable RetrieveAllProperties(Boolean onlyPublic = false) => this.Retrieve(onlyPublic ? GetAllPublicPropertiesFunc() : GetAllPropertiesFunc());
+ public IEnumerable RetrieveAllProperties(Boolean onlyPublic = false) => this.Retrieve(onlyPublic ? GetAllPublicPropertiesFunc() : GetAllPropertiesFunc());*/
///
/// Retrieves all properties.
diff --git a/Swan.Tiny/Reflection/TypeCache.cs b/Swan.Tiny/Reflection/TypeCache.cs
index d6bd3b3..1577cb5 100644
--- a/Swan.Tiny/Reflection/TypeCache.cs
+++ b/Swan.Tiny/Reflection/TypeCache.cs
@@ -13,7 +13,7 @@ namespace Swan.Reflection {
///
/// The type of Member to be cached.
public abstract class TypeCache : CollectionCacheRepository {
- ///
+ /*///
/// Determines whether the cache contains the specified type.
///
/// The type of the out.
@@ -30,7 +30,7 @@ namespace Swan.Reflection {
/// The type of the out.
/// The factory.
/// An array of the properties stored for the specified type.
- public IEnumerable Retrieve(Func> factory) => this.Retrieve(typeof(TOut), factory);
+ public IEnumerable Retrieve(Func> factory) => this.Retrieve(typeof(TOut), factory);*/
}
///
@@ -48,14 +48,14 @@ namespace Swan.Reflection {
///
public static Lazy DefaultCache { get; } = new Lazy(() => new FieldTypeCache());
- ///
+ /*///
/// Retrieves all fields.
///
/// The type to inspect.
///
/// A collection with all the fields in the given type.
///
- public IEnumerable RetrieveAllFields() => this.Retrieve(GetAllFieldsFunc());
+ public IEnumerable RetrieveAllFields() => this.Retrieve(GetAllFieldsFunc());*/
///
/// Retrieves all fields.
diff --git a/Swan.Tiny/SingletonBase.cs b/Swan.Tiny/SingletonBase.cs
index cc03cdb..0a286f2 100644
--- a/Swan.Tiny/SingletonBase.cs
+++ b/Swan.Tiny/SingletonBase.cs
@@ -1,6 +1,7 @@
using System;
namespace Swan {
+ // [Obsolete("NEED", false)]
///
/// Represents a singleton pattern abstract class.
///
@@ -20,6 +21,7 @@ namespace Swan {
///
/// The instance.
///
+ // [Obsolete("NEED", false)]
public static T Instance => LazyInstance.Value;
///
diff --git a/Swan.Tiny/StructEndiannessAttribute.cs b/Swan.Tiny/StructEndiannessAttribute.cs
index 5648093..7fc58d1 100644
--- a/Swan.Tiny/StructEndiannessAttribute.cs
+++ b/Swan.Tiny/StructEndiannessAttribute.cs
@@ -1,4 +1,4 @@
-using System;
+/*using System;
namespace Swan {
///
@@ -24,4 +24,4 @@ namespace Swan {
get;
}
}
-}
\ No newline at end of file
+}*/
\ No newline at end of file
diff --git a/Swan.Tiny/SwanRuntime.cs b/Swan.Tiny/SwanRuntime.cs
index d93109d..6e9dfb6 100644
--- a/Swan.Tiny/SwanRuntime.cs
+++ b/Swan.Tiny/SwanRuntime.cs
@@ -9,7 +9,7 @@ namespace Swan {
/// Provides utility methods to retrieve information about the current application.
///
public static class SwanRuntime {
- private static readonly Lazy EntryAssemblyLazy = new Lazy(Assembly.GetEntryAssembly);
+ /*private static readonly Lazy EntryAssemblyLazy = new Lazy(Assembly.GetEntryAssembly);
private static readonly Lazy CompanyNameLazy = new Lazy(() => {
AssemblyCompanyAttribute attribute = EntryAssembly.GetCustomAttribute(typeof(AssemblyCompanyAttribute)) as AssemblyCompanyAttribute;
@@ -28,18 +28,19 @@ namespace Swan {
private static readonly String ApplicationMutexName = "Global\\{{" + EntryAssembly.FullName + "}}";
- private static readonly Object SyncLock = new Object();
+ private static readonly Object SyncLock = new Object();*/
+ // [Obsolete("NEED", false)]
private static OperatingSystem? _oS;
- #region Properties
-
+ #region Properties
///
/// Gets the current Operating System.
///
///
/// The os.
///
+ // [Obsolete("NEED", false)]
public static OperatingSystem OS {
get {
if(_oS.HasValue == false) {
@@ -54,7 +55,7 @@ namespace Swan {
}
- ///
+ /*///
/// Checks if this application (including version number) is the only instance currently running.
///
///
@@ -171,11 +172,11 @@ namespace Swan {
return returnPath;
}
- }
+ }*/
#endregion
- #region Methods
+ /*#region Methods
///
/// Build a full path pointing to the current user's desktop with the given filename.
@@ -195,6 +196,6 @@ namespace Swan {
return Path.GetFullPath(pathWithFilename);
}
- #endregion
+ #endregion*/
}
}
diff --git a/Swan.Tiny/Terminal.Output.cs b/Swan.Tiny/Terminal.Output.cs
index ec08772..a66beb3 100644
--- a/Swan.Tiny/Terminal.Output.cs
+++ b/Swan.Tiny/Terminal.Output.cs
@@ -7,7 +7,7 @@ namespace Swan {
/// This class is thread-safe :).
///
public static partial class Terminal {
- ///
+ /*///
/// Writes a character a number of times, optionally adding a new line at the end.
///
/// The character code.
@@ -32,7 +32,7 @@ namespace Swan {
EnqueueOutput(context);
}
- }
+ }*/
///
/// Writes the specified text in the given color.
@@ -40,6 +40,7 @@ namespace Swan {
/// The text.
/// The color.
/// The writer flags.
+ // [Obsolete("NEED", false)]
public static void Write(String? text, ConsoleColor? color = null, TerminalWriters writerFlags = TerminalWriters.StandardOutput) {
if(text == null) {
return;
@@ -57,7 +58,7 @@ namespace Swan {
}
}
- ///
+ /*///
/// Writes a New Line Sequence to the standard output.
///
/// The writer flags.
@@ -83,6 +84,6 @@ namespace Swan {
Write($"\r{text ?? String.Empty}", color, writerFlags);
Flush();
CursorLeft = 0;
- }
+ }*/
}
}
diff --git a/Swan.Tiny/Terminal.Settings.cs b/Swan.Tiny/Terminal.Settings.cs
index abb700c..fae3b3a 100644
--- a/Swan.Tiny/Terminal.Settings.cs
+++ b/Swan.Tiny/Terminal.Settings.cs
@@ -18,7 +18,7 @@ namespace Swan {
///
public static ConsoleColor DefaultColor { get; set; } = Console.ForegroundColor;
- ///
+ /*///
/// Gets the color of the border.
///
///
@@ -40,7 +40,7 @@ namespace Swan {
///
/// The user option text.
///
- public static String UserOptionText { get; set; } = " Option: ";
+ public static String UserOptionText { get; set; } = " Option: ";*/
}
}
}
diff --git a/Swan.Tiny/Terminal.cs b/Swan.Tiny/Terminal.cs
index 596c8c8..c10e8f5 100644
--- a/Swan.Tiny/Terminal.cs
+++ b/Swan.Tiny/Terminal.cs
@@ -12,15 +12,20 @@ namespace Swan {
///
public static partial class Terminal {
#region Private Declarations
-
+ // [Obsolete("NEED", false)]
private const Int32 OutputFlushInterval = 15;
+ // [Obsolete("NEED", false)]
private static readonly ExclusiveTimer DequeueOutputTimer;
+ // [Obsolete("NEED", false)]
private static readonly Object SyncLock = new Object();
+ // [Obsolete("NEED", false)]
private static readonly ConcurrentQueue OutputQueue = new ConcurrentQueue();
-
+ // [Obsolete("NEED", false)]
private static readonly ManualResetEventSlim OutputDone = new ManualResetEventSlim(false);
+ // [Obsolete("NEED", false)]
private static readonly ManualResetEventSlim InputDone = new ManualResetEventSlim(true);
+ // [Obsolete("NEED", false)]
private static Boolean? _isConsolePresent;
#endregion
@@ -30,6 +35,7 @@ namespace Swan {
///
/// Initializes static members of the class.
///
+ // [Obsolete("NEED", false)]
static Terminal() {
lock(SyncLock) {
if(DequeueOutputTimer != null) {
@@ -48,7 +54,7 @@ namespace Swan {
#endregion
- #region Synchronized Cursor Movement
+ /*#region Synchronized Cursor Movement
///
/// Gets or sets the cursor left position.
@@ -108,7 +114,7 @@ namespace Swan {
}
}
- #endregion
+ #endregion*/
#region Properties
@@ -118,6 +124,7 @@ namespace Swan {
///
/// true if this instance is console present; otherwise, false.
///
+ // [Obsolete("NEED", false)]
public static Boolean IsConsolePresent {
get {
if(_isConsolePresent == null) {
@@ -140,6 +147,7 @@ namespace Swan {
///
/// The available writers.
///
+ // [Obsolete("NEED", false)]
public static TerminalWriters AvailableWriters => IsConsolePresent ? TerminalWriters.StandardError | TerminalWriters.StandardOutput : TerminalWriters.None;
///
@@ -148,6 +156,7 @@ namespace Swan {
///
/// The output encoding.
///
+ // [Obsolete("NEED", false)]
public static Encoding OutputEncoding {
get => Console.OutputEncoding;
set => Console.OutputEncoding = value;
@@ -157,7 +166,7 @@ namespace Swan {
#region Methods
- ///
+ /*///
/// Waits for all of the queued output messages to be written out to the console.
/// Call this method if it is important to display console text before
/// quitting the application such as showing usage or help.
@@ -224,7 +233,7 @@ namespace Swan {
public static void WriteWelcomeBanner(ConsoleColor color = ConsoleColor.Gray) {
WriteLine($"{SwanRuntime.CompanyName} {SwanRuntime.ProductName} [Version {SwanRuntime.EntryAssemblyVersion}]", color);
WriteLine($"{SwanRuntime.ProductTrademark}", color);
- }
+ }*/
///
/// Enqueues the output to be written to the console
@@ -232,6 +241,7 @@ namespace Swan {
/// Please note that if AvailableWriters is None, then no output will be enqueued.
///
/// The context.
+ // [Obsolete("NEED", false)]
private static void EnqueueOutput(OutputContext context) {
lock(SyncLock) {
TerminalWriters availableWriters = AvailableWriters;
@@ -253,6 +263,7 @@ namespace Swan {
///
/// Runs a Terminal I/O cycle in the thread.
///
+ // [Obsolete("NEED", false)]
private static void DequeueOutputCycle() {
if(AvailableWriters == TerminalWriters.None) {
OutputDone.Set();
@@ -302,6 +313,7 @@ namespace Swan {
///
/// Represents an asynchronous output context.
///
+ // [Obsolete("NEED", false)]
private sealed class OutputContext {
///
/// Initializes a new instance of the class.
diff --git a/Swan.Tiny/Threading/AtomicTypeBase.cs b/Swan.Tiny/Threading/AtomicTypeBase.cs
index 4ea9c50..8deb770 100644
--- a/Swan.Tiny/Threading/AtomicTypeBase.cs
+++ b/Swan.Tiny/Threading/AtomicTypeBase.cs
@@ -54,7 +54,7 @@ namespace Swan.Threading {
///
public static Boolean operator !=(AtomicTypeBase a, T b) => a?.Equals(b) == false;
- ///
+ /*///
/// Implements the operator >.
///
/// a.
@@ -142,7 +142,7 @@ namespace Swan.Threading {
public static AtomicTypeBase operator -(AtomicTypeBase instance, Int64 operand) {
instance.BackingValue -= operand;
return instance;
- }
+ }*/
///
/// Compares the value to the other instance.
diff --git a/Swan.Tiny/Threading/ExclusiveTimer.cs b/Swan.Tiny/Threading/ExclusiveTimer.cs
index d3c9c3e..e242eb4 100644
--- a/Swan.Tiny/Threading/ExclusiveTimer.cs
+++ b/Swan.Tiny/Threading/ExclusiveTimer.cs
@@ -29,7 +29,7 @@ namespace Swan.Threading {
this._backingTimer = new Timer(this.InternalCallback, state ?? this, dueTime, Timeout.Infinite);
}
- ///
+ /*///
/// Initializes a new instance of the class.
///
/// The timer callback.
@@ -38,15 +38,15 @@ namespace Swan.Threading {
/// The period.
public ExclusiveTimer(TimerCallback timerCallback, Object state, TimeSpan dueTime, TimeSpan period) : this(timerCallback, state, Convert.ToInt32(dueTime.TotalMilliseconds), Convert.ToInt32(period.TotalMilliseconds)) {
// placeholder
- }
+ }*/
- ///
+ /*///
/// Initializes a new instance of the class.
///
/// The timer callback.
public ExclusiveTimer(TimerCallback timerCallback) : this(timerCallback, null, Timeout.Infinite, Timeout.Infinite) {
// placeholder
- }
+ }*/
///
/// Initializes a new instance of the class.
@@ -58,7 +58,7 @@ namespace Swan.Threading {
// placeholder
}
- ///
+ /*///
/// Initializes a new instance of the class.
///
/// The timer callback.
@@ -66,12 +66,13 @@ namespace Swan.Threading {
/// The period.
public ExclusiveTimer(Action timerCallback, TimeSpan dueTime, TimeSpan period) : this(s => timerCallback?.Invoke(), null, dueTime, period) {
// placeholder
- }
+ }*/
///
/// Initializes a new instance of the class.
///
/// The timer callback.
+ // [Obsolete("NEED", false)]
public ExclusiveTimer(Action timerCallback) : this(timerCallback, Timeout.Infinite, Timeout.Infinite) {
// placeholder
}
@@ -92,7 +93,7 @@ namespace Swan.Threading {
///
public Boolean IsDisposed => this._isDisposed.Value;
- ///
+ /*///
/// Waits until the time is elapsed.
///
/// The until date.
@@ -112,15 +113,15 @@ namespace Swan.Threading {
while(!cancellationToken.IsCancellationRequested && DateTime.UtcNow < untilDate) {
delayLock.Wait();
}
- }
+ }*/
- ///
+ /*///
/// Waits the specified wait time.
///
/// The wait time.
/// The cancellation token.
public static void Wait(TimeSpan waitTime, CancellationToken cancellationToken = default) =>
- WaitUntil(DateTime.UtcNow.Add(waitTime), cancellationToken);
+ WaitUntil(DateTime.UtcNow.Add(waitTime), cancellationToken);*/
///
/// Changes the start time and the interval between method invocations for the internal timer.
@@ -133,24 +134,25 @@ namespace Swan.Threading {
_ = this._backingTimer.Change(dueTime, Timeout.Infinite);
}
- ///
+ /*///
/// Changes the start time and the interval between method invocations for the internal timer.
///
/// The due time.
/// The period.
- public void Change(TimeSpan dueTime, TimeSpan period) => this.Change(Convert.ToInt32(dueTime.TotalMilliseconds), Convert.ToInt32(period.TotalMilliseconds));
+ public void Change(TimeSpan dueTime, TimeSpan period) => this.Change(Convert.ToInt32(dueTime.TotalMilliseconds), Convert.ToInt32(period.TotalMilliseconds));*/
///
/// Changes the interval between method invocations for the internal timer.
///
/// The period.
+ // [Obsolete("NEED", false)]
public void Resume(Int32 period) => this.Change(0, period);
- ///
+ /*///
/// Changes the interval between method invocations for the internal timer.
///
/// The period.
- public void Resume(TimeSpan period) => this.Change(TimeSpan.Zero, period);
+ public void Resume(TimeSpan period) => this.Change(TimeSpan.Zero, period);*/
///
/// Pauses this instance.
diff --git a/Swan.Tiny/Threading/WaitEventFactory.cs b/Swan.Tiny/Threading/WaitEventFactory.cs
index 8def40c..a303fe9 100644
--- a/Swan.Tiny/Threading/WaitEventFactory.cs
+++ b/Swan.Tiny/Threading/WaitEventFactory.cs
@@ -67,13 +67,13 @@ namespace Swan.Threading {
/// The Wait Event.
public static IWaitEvent CreateSlim(Boolean isCompleted) => new WaitEventSlim(isCompleted);
- ///
+ /*///
/// Creates a Wait Event backed by a ManualResetEventSlim.
///
/// if initially set to completed. Generally true.
/// if set to true creates a slim version of the wait event.
/// The Wait Event.
- public static IWaitEvent Create(Boolean isCompleted, Boolean useSlim) => useSlim ? CreateSlim(isCompleted) : Create(isCompleted);
+ public static IWaitEvent Create(Boolean isCompleted, Boolean useSlim) => useSlim ? CreateSlim(isCompleted) : Create(isCompleted);*/
#endregion
diff --git a/Unosquare.RaspberryIO/Camera/CameraColor.cs b/Unosquare.RaspberryIO/Camera/CameraColor.cs
index bcdb8ec..edad3f1 100644
--- a/Unosquare.RaspberryIO/Camera/CameraColor.cs
+++ b/Unosquare.RaspberryIO/Camera/CameraColor.cs
@@ -1,5 +1,6 @@
using System;
using System.Linq;
+
using Swan;
namespace Unosquare.RaspberryIO.Camera {