Click or drag to resize

IPropertyBag Interface

Bag with properties. The recommended method is to access the properties by a property key (PropertyKeyBase). For compatibility, properties can also be stored and retrieved with strings.

Namespace: Altaxo.Main.Properties
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public interface IPropertyBag : IReadOnlyPropertyBag, 
	IChangedEventSource, IEnumerable<KeyValuePair<string, Object>>, 
	IEnumerable, IDisposable, ICopyFrom, ICloneable

The IPropertyBag type exposes the following members.

Properties
 NameDescription
Public propertyCount Gets the number of properties in this instance.
Public propertyKeys Gets the property keys in this bag.
(Inherited from IReadOnlyPropertyBag)
Public propertyTemporaryPropertyPrefix Get a string that designates a temporary property (i.e. a property that is not stored permanently). If any property key starts with this prefix, the propery is not serialized when saving the project to file.
Top
Methods
 NameDescription
Public methodClearRemoves all properties in this instance.
Public methodCloneCreates a new object that is a copy of the current instance.
(Inherited from ICloneable)
Public methodCopyFrom Try to copy from another object. Should try to copy even if the object to copy from is not of the same type, but a base type. In this case only the base properties should be copied.
(Inherited from ICopyFrom)
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable)
Public methodGetEnumeratorReturns an enumerator that iterates through the collection.
(Inherited from IEnumerableKeyValuePairString, Object)
Public methodGetValueT(PropertyKeyT) Gets the value of a property. This method will throw an exception if the property is not found in the bag.
(Inherited from IReadOnlyPropertyBag)
Public methodGetValueT(String) Gets the value of a property.
Public methodGetValueT(PropertyKeyT, T) Gets the value of a property. If the property is not found in the bag, the provided default value is returned.
(Inherited from IReadOnlyPropertyBag)
Public methodRemoveValue(String) Removes a property from this instance.
Public methodRemoveValueT(PropertyKeyT) Removes a property from this instance.
Public methodSetValueT(PropertyKeyT, T) Sets the value of a property.
Public methodSetValueT(String, T) Sets the value of a property.
Public methodTryGetValueT(PropertyKeyT, T) Tries to get the value of a property.
(Inherited from IReadOnlyPropertyBag)
Public methodTryGetValueT(String, T) Tries to get the value of a property.
Top
Events
 NameDescription
Public eventChangedFired when something in the object has changed.
(Inherited from IChangedEventSource)
Top
Extension Methods
 NameDescription
Public Extension MethodFirstOrKeyValuePairString, Object Returns the first value of the enumeration, or, if the enumeration is empty, the other value provided in the arguments.
(Defined by EnumerableExtensions)
Public Extension MethodFlattenFromRootToLeavesKeyValuePairString, Object Converts a recursive data structure into a flat list. The root element is enumerated before its corresponding child element(s).
(Defined by EnumerableExtensions)
Public Extension MethodForEachDoKeyValuePairString, Object Executes an action for each element of the sequence.
(Defined by EnumerableExtensions)
Public Extension MethodHasSingleElementKeyValuePairString, Object Determines whether the specified enumeration has exactly one element.
(Defined by EnumerableExtensions)
Public Extension MethodIndexOfKeyValuePairString, Object Gets the index of an item in a enumeration or list.
(Defined by ListExtensions)
Public Extension MethodIndexOfFirstKeyValuePairString, Object Gets the index the of first item in list that fulfills the predicate predicate
(Defined by ListExtensions)
Public Extension MethodIndexOfFirstKeyValuePairString, Object Gets the index the of first item in list that fulfills the predicate predicate
(Defined by ListExtensions)
Public Extension MethodIndexOfMaxKeyValuePairString, ObjectReturn the index of the element with the maximum value in an enumerable. If multiple elements with the same minimal value exist, the index of the first element in the sequence is returned.
(Defined by EnumerableExtensions)
Public Extension MethodIndexOfMinKeyValuePairString, ObjectReturn the index of the element with the minimum value in an enumerable. If multiple elements with the same minimal value exist, the index of the first element in the sequence is returned.
(Defined by EnumerableExtensions)
Public Extension MethodIndicesInt32AndValuesWhereKeyValuePairString, Object Returns tuples of index and element of all elements in an enumeration which fullfill a given condition, given by the element's value.
(Defined by EnumerableExtensions)
Public Extension MethodIndicesInt32AndValuesWhereKeyValuePairString, Object Returns tuples of index and element of all elements in an enumeration which fullfill a given condition, given by the element's value and its index.
(Defined by EnumerableExtensions)
Public Extension MethodIndicesInt32WhereKeyValuePairString, Object Returns the indices of the elements which fullfill a given condition, given by the element's value.
(Defined by EnumerableExtensions)
Public Extension MethodIndicesInt32WhereKeyValuePairString, Object Returns the indices of the elements which fullfill a given condition, given by the element's value and its index.
(Defined by EnumerableExtensions)
Public Extension MethodIndicesOfMinMaxKeyValuePairString, ObjectReturn the index of the element with the minimum value in an enumerable. If multiple elements with the same minimal value exist, the index of the first element in the sequence is returned.
(Defined by EnumerableExtensions)
Public Extension MethodIsEmptyKeyValuePairString, Object Determines whether the specified enumeration is empty.
(Defined by EnumerableExtensions)
Public Extension MethodJoinConditionalKeyValuePairString, Object, T2 Takes a join of two sequences, but only takes into account those pair, which fulfill a given condition.
(Defined by EnumerableExtensions)
Public Extension MethodJoinConditionalKeyValuePairString, Object, T2, TResult Takes a join of two sequences, but only takes into account those pair, which fulfill a given condition.
(Defined by EnumerableExtensions)
Public Extension MethodLastOrKeyValuePairString, Object Returns the last value of the enumeration, or, if the enumeration is empty, the other value provided in the arguments.
(Defined by EnumerableExtensions)
Public Extension MethodMaxElementKeyValuePairString, Object, M Gets the element of a IEnumerabe that evaluates by means of a conversion function to the maximal value. This is different from Select(x => conversion(x)).Max() insofar as it not returns the maximum value, but the original element x which converts to the maximum value.
(Defined by EnumerableExtensions)
Public Extension MethodMaxOrDefaultKeyValuePairString, Object, M Evaluates the maximum of a enumeration of elements, or returns a default value if the series is empty.
(Defined by EnumerableExtensions)
Public Extension MethodSelectCombinationKeyValuePairString, Object Select a random combination, without repetition, from a data sequence by selecting k elements in original order.
(Defined by Combinatorics)
Public Extension MethodSelectCombinationWithRepetitionKeyValuePairString, Object Select a random combination, with repetition, from a data sequence by selecting k elements in original order.
(Defined by Combinatorics)
Public Extension MethodSelectPermutationKeyValuePairString, Object Select a random permutation from a data sequence by returning the provided data in random order. Implemented using Fisher-Yates Shuffling.
(Defined by Combinatorics)
Public Extension MethodSelectVariationKeyValuePairString, Object Select a random variation, without repetition, from a data sequence by randomly selecting k elements in random order. Implemented using partial Fisher-Yates Shuffling.
(Defined by Combinatorics)
Public Extension MethodSelectVariationWithRepetitionKeyValuePairString, Object Select a random variation, with repetition, from a data sequence by randomly selecting k elements in random order.
(Defined by Combinatorics)
Public Extension MethodTakeAllButLastKeyValuePairString, Object Takes all elements of the enumeration except the last element.
(Defined by EnumerableExtensions)
Public Extension MethodThisOrEmptyKeyValuePairString, Object Returns either the provided enumeration, or if it is null, an empty enumeration.
(Defined by EnumerableExtensions)
Public Extension MethodTryGetFirstAndLastKeyValuePairString, Object Returns true and the first and last value of the enumeration, or, if the enumeration is empty, returns false.
(Defined by EnumerableExtensions)
Public Extension MethodTryGetSingleElementKeyValuePairString, Object Try to get the one and only element of the collection.
(Defined by EnumerableExtensions)
Top
See Also