Click or drag to resize

ProtocolSocketGetOrAddAspect Method

Adds an aspect to a socket by using the specified function, if the key does not already exist.

Namespace:  Demo3D.Net
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 15.0.2.11458
Syntax
C#
public Object GetOrAddAspect(
	Type typeOfAspect,
	Func<Type, Object> newAspect
)

Parameters

typeOfAspect
Type: SystemType
The type of the aspect to add.
newAspect
Type: SystemFuncType, Object
The function used to generate a new aspect.

Return Value

Type: Object
The apsect. This will be either the existing aspect if it's already set, or the new aspect as returned by newAspect if the aspect was not in the dictionary.
Remarks
Thread safe.
See Also