From 8ec439b9a0b6453f2021b2f79af939923b6f1621 Mon Sep 17 00:00:00 2001 From: Marc Bernard <59966492+mbtools@users.noreply.github.com> Date: Tue, 5 Oct 2021 08:57:04 -0400 Subject: [PATCH] Docs: Add example for casting to API doc (#5010) * Docs: Add example for casting to API doc * Update api.md --- docs/collections/_development/api.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/collections/_development/api.md b/docs/collections/_development/api.md index 6d4ec430d..97d054789 100644 --- a/docs/collections/_development/api.md +++ b/docs/collections/_development/api.md @@ -56,10 +56,20 @@ Get an instance of a repository: DATA(lo_repo) = zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). ``` +Cast to online or offline repository: + +```abap +DATA lo_repo_online TYPE REF TO zcl_abapgit_repo_online. +lo_repo_online ?= lo_repo. + +DATA lo_repo_offline TYPE REF TO zcl_abapgit_repo_offline. +lo_repo_offline ?= lo_repo. +``` + Get a structure containing all properties and local settings of a repository: ```abap -DATA(ls_repo) = NEW zcl_abapgit_persistence_repo( )->read( iv_key ). +DATA(ls_repo) = NEW zcl_abapgit_persist_factory=>get_repo( )->read( iv_key ). ``` ### Find ###