Show / Hide Table of Contents

Class CompassHelpers

A class of helper functions used with the Compass.

Inheritance
System.Object
CompassHelpers
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Controls.Compass
Assembly: Phoenix.Controls.Compass.dll
Syntax
public static class CompassHelpers

Methods

View Source

ConvertRefreshRateToTimeSpan(TimeSpanType, String)

Helper function to convert a refresh rate string and time span type into a TimeSpan object.

Declaration
public static TimeSpan? ConvertRefreshRateToTimeSpan(TimeSpanType timeSpanType, string refreshRateString)
Parameters
Type Name Description
TimeSpanType timeSpanType

The time span type such as seconds, minutes, etc.

System.String refreshRateString

The numerical rate as a string.

Returns
Type Description
System.Nullable<System.TimeSpan>

A timespan based on the given parameters or null.

View Source

DuplicateCollectionInPlace<TFinal, TOriginal>(List<TFinal>, IList<TOriginal>, Func<TFinal, TOriginal, Boolean>, Func<TOriginal, TFinal>, Action<TFinal, TOriginal>)

Copies over a collection from source to destination.

Declaration
public static void DuplicateCollectionInPlace<TFinal, TOriginal>(List<TFinal> destination, IList<TOriginal> source, Func<TFinal, TOriginal, bool> comparer, Func<TOriginal, TFinal> createNew, Action<TFinal, TOriginal> copyExisting = null)
    where TFinal : class
Parameters
Type Name Description
System.Collections.Generic.List<TFinal> destination

The collection to copy the objects to.

System.Collections.Generic.IList<TOriginal> source

The source of the objects to copy.

System.Func<TFinal, TOriginal, System.Boolean> comparer

Comparison function.

System.Func<TOriginal, TFinal> createNew

Creation function.

System.Action<TFinal, TOriginal> copyExisting

Copy function.

Type Parameters
Name Description
TFinal

A class the final collection will be.

TOriginal

A class the source type is currently.

View Source

DuplicateCollectionInPlace<TFinal, TOriginal>(ObservableCollection<TFinal>, IList<TOriginal>, Func<TFinal, TOriginal, Boolean>, Func<TOriginal, TFinal>, Action<TFinal, TOriginal>)

Copies over a collection from source to destination.

Declaration
public static void DuplicateCollectionInPlace<TFinal, TOriginal>(ObservableCollection<TFinal> destination, IList<TOriginal> source, Func<TFinal, TOriginal, bool> comparer, Func<TOriginal, TFinal> createNew, Action<TFinal, TOriginal> copyExisting = null)
    where TFinal : class
Parameters
Type Name Description
System.Collections.ObjectModel.ObservableCollection<TFinal> destination

The collection to copy the objects to.

System.Collections.Generic.IList<TOriginal> source

The source of the objects to copy.

System.Func<TFinal, TOriginal, System.Boolean> comparer

Comparison function.

System.Func<TOriginal, TFinal> createNew

Creation function.

System.Action<TFinal, TOriginal> copyExisting

Copy function.

Type Parameters
Name Description
TFinal

A class the final collection will be.

TOriginal

A class the source type is currently.

  • View Source
In This Article
Back to top Generated by DocFX