Ofcas.Lk.Api.Client - Version 3.0 3.0.0.112

Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Ofcas.Lk.Api.Client.Core.CoreObjectBase Class Reference

CoreObjectBase is the base class for all objects and holds general data (for example, the object instance ID of the parent). Each object is assigned with a unique identification number (Id) More...

Inheritance diagram for Ofcas.Lk.Api.Client.Core.CoreObjectBase:

## Public Member Functions
bool | CanDispose ()
| Returns the information about whether the object can be deleted. An object can only be deleted if no children live. More...
IList< Guid > | Children ()
| Returns a list with Id for all children More...
Public Member Functions inherited from Ofcas.Lk.Api.Client.Core.Disposable
void | Dispose ()

## Public Attributes
Guid | CoreObjectId => Id
| This property is deprecated. Please use CoreObjectBase.Id instead. More...

## Protected Member Functions
| CoreObjectBase (IServiceFactory< IApiService > serviceFactory, Guid coreObjectId, bool ownsObject=true)
T | CallService< T > (Func< IApiService, T > serviceCall, Guid projectGuid=default(Guid), [CallerMemberName] string callerMethod=null)
| Calls a service function and raises an error if it fails. More...
T | CallServiceWithMessage< T > (Func< IApiService, T > serviceCall, Guid projectGuid=default(Guid), [CallerMemberName] string callerMethod=null)
| Calls a service function and raises an error if it fails. More...
override void | Dispose (bool disposing)

## Protected Attributes
const string | NotSupportedCauseNotImplemented = "This method is not implemented, therefore not supported."
| Default message for methods which are not supported because they are not implemented. More...

## Properties
IServiceFactory< IApiService > | ServiceFactory`[get]`
| For internal purposes only. More...
Guid | Id`[get]`
| The unique identifier of the object instance. More...
Properties inherited from Ofcas.Lk.Api.Client.Core.Interfaces.ICoreObject
Guid | CoreObjectId`[get]`
| This property is deprecated. Please use ICoreObject.Id instead. More...
Guid | Id`[get]`
| The unique identifier of this core object. More...

## Additional Inherited Members
Events inherited from Ofcas.Lk.Api.Client.Core.Disposable
Action< Disposable > | Disposed

## Detailed Description

CoreObjectBase is the base class for all objects and holds general data (for example, the object instance ID of the parent). Each object is assigned with a unique identification number (Id)

## Member Function Documentation

## ◆ CallService< T >()

T Ofcas.Lk.Api.Client.Core.CoreObjectBase.CallService< T > | ( | Func< IApiService, T > | serviceCall,
|  | Guid | projectGuid = `default(Guid)`,
|  | [CallerMemberName] string | callerMethod = `null`
| ) |  |
| protected

Calls a service function and raises an error if it fails.

Template Parameters

  T | The type of BaseResponse expected.

Parameters

  serviceCall | The call to be executed.
  projectGuid | The caller project guid.
  callerMethod | The caller method.

Returns

Type Constraints

  T | : | IBaseResponse |

## ◆ CallServiceWithMessage< T >()

T Ofcas.Lk.Api.Client.Core.CoreObjectBase.CallServiceWithMessage< T > | ( | Func< IApiService, T > | serviceCall,
|  | Guid | projectGuid = `default(Guid)`,
|  | [CallerMemberName] string | callerMethod = `null`
| ) |  |
| protected

Calls a service function and raises an error if it fails.

Template Parameters

  T | The type of MessageBase and IBaseResponse expected.

Parameters

  serviceCall | The call to be executed.
  projectGuid | The caller project guid.
  callerMethod | The caller method.

Returns

Type Constraints

  T | : | MessageBase |
  T | : | IBaseResponse |

## ◆ CanDispose()

bool Ofcas.Lk.Api.Client.Core.CoreObjectBase.CanDispose | ( |  | ) |

Returns the information about whether the object can be deleted. An object can only be deleted if no children live.

Returns
  true, if the core object can be deleted otherwise false

Implements Ofcas.Lk.Api.Client.Core.Interfaces.ICoreObject.

## ◆ Children()

IList<Guid> Ofcas.Lk.Api.Client.Core.CoreObjectBase.Children | ( |  | ) |

Returns a list with Id for all children

Returns

## Member Data Documentation

## ◆ CoreObjectId

Guid Ofcas.Lk.Api.Client.Core.CoreObjectBase.CoreObjectId => Id

This property is deprecated. Please use CoreObjectBase.Id instead.

## ◆ NotSupportedCauseNotImplemented

const string Ofcas.Lk.Api.Client.Core.CoreObjectBase.NotSupportedCauseNotImplemented = "This method is not implemented, therefore not supported."
| protected

Default message for methods which are not supported because they are not implemented.

## Property Documentation

## ◆ Id

Guid Ofcas.Lk.Api.Client.Core.CoreObjectBase.Id
| get

The unique identifier of the object instance.

## ◆ ServiceFactory

IServiceFactory<IApiService> Ofcas.Lk.Api.Client.Core.CoreObjectBase.ServiceFactory
| get protected

For internal purposes only.

Returns

The documentation for this class was generated from the following file:

- CoreObjectBase.cs