Class Property<T, K>
- Namespace
- GObject
- Assembly
- GObject-2.0.dll
Describes a GProperty.
public sealed class Property<T, K> : PropertyDefinition<T>
Type Parameters
TThe type of the value this property will store.
KThe type of the class / interface implementing this property.
- Inheritance
-
Property<T, K>
- Implements
- Inherited Members
Constructors
Property(string, string)
Initializes a new instance of Property<T, K>.
public Property(string unmanagedName, string managedName)
Parameters
unmanagedNamestringThe GObject/C name of this property.
managedNamestringThe dotnet name of this property.
Properties
ManagedName
The name of the property in dotnet.
public string ManagedName { get; }
Property Value
UnmanagedName
The name of the property in GObject/C.
public string UnmanagedName { get; }
Property Value
Methods
Get(K)
Get the value of this property in the given object.
public T Get(K obj)
Parameters
objK
Returns
- T
Exceptions
- ArgumentException
If obj is not a GObject.Object.
Notify(K, SignalHandler<Object, NotifySignalArgs>, bool)
Registers a signal handler to get notified if the property is changed.
public void Notify(K sender, SignalHandler<Object, Object.NotifySignalArgs> signalHandler, bool after = false)
Parameters
senderKThe instance providing the property which should be listened to.
signalHandlerSignalHandler<Object, Object.NotifySignalArgs>The handler which should be invoked if the property changes.
afterboolDefine if the signal handler action must be called before or after the default handler.
Exceptions
- ArgumentException
If the sender is not a GObject.Object.
Set(K, T)
Set the value of this property in the given object using the given value.
public void Set(K obj, T value)
Parameters
objKvalueT
Exceptions
- ArgumentException
If obj is not a GObject.Object.
Unnotify(K, SignalHandler<Object, NotifySignalArgs>)
Deregisters a signal handler.
public void Unnotify(K sender, SignalHandler<Object, Object.NotifySignalArgs> signalHandler)
Parameters
senderKThe instance providing the property which should be deregistered.
signalHandlerSignalHandler<Object, Object.NotifySignalArgs>The signal handler which should be deregistered.
Exceptions
- ArgumentException
If the sender is not a GObject.Object.