Skip to content

Commit

Permalink
docs 17.00.01 wip
Browse files Browse the repository at this point in the history
  • Loading branch information
iJungleboy committed Jan 12, 2024
1 parent be3342a commit 89ed7e5
Show file tree
Hide file tree
Showing 235 changed files with 9,560 additions and 3,473 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
---
uid: Custom.DataSource
summary: Classes to inherit from when creating custom DataSources in Dnn ☢️ & Oqtane 🩸.
summary: Base classes for your custom DataSources in Dnn ☢️ & Oqtane 🩸.
# title: Custom.Hybrid Namespace
---

# Custom.DataSource Namespace Dnn ☢️ & Oqtane 🩸

This contains all the base classes for your own DataSources.
12 changes: 7 additions & 5 deletions 2sxc Docs Generator/api/dot-net/Custom/Dnn/Api12.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
uid: Custom.Dnn.Api12
summary: Base Class for modern Api Controllers in Dnn
summary: Base Class for Api Controllers for Dnn ☢️ only.
---

### Class Custom.Dnn.Api12 for Dnn ☢️

This is the Dnn specific base class. It's the very same as `Custom.Hybrid.Api12` except for the additional `Dnn` Property.
This is the Dnn specific base class. It's the very same as `Custom.Hybrid.Api12` except for the additional `Dnn` Property.
If you inherit from this class, you'll automatically have all the properties from [DynamicCode](xref:NetCode.DynamicCode.Index).

Because of this, the documentation here only shows `Dnn` - for all other properties go to [Custom.Hybrid.Api12](xref:Custom.Hybrid.Api12)

> [!TIP]
> If you don't need these special properties, we strongly suggest to move to the Hybrid implementation.
> If you don't need the `Dnn` object, we strongly suggest to move to the Hybrid implementation.
>
> The latest Hybrid base classes also have many new features and are easier to use.
> See [](xref:Custom.Hybrid) for more information.
12 changes: 7 additions & 5 deletions 2sxc Docs Generator/api/dot-net/Custom/Dnn/Code12.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
uid: Custom.Dnn.Code12
summary: Base Class for Dynamic CSharp Classes in Dnn
summary: Base Class for Dynamic CSharp Classes in Dnn ☢️ only.
---

### Class Custom.Dnn.Code12 for Dnn ☢️

This is the Dnn specific base class. It's the very same as `Custom.Hybrid.Code12` except for the additional `Dnn` Property.
This is the Dnn specific base class. It's the very same as `Custom.Hybrid.Code12` except for the additional `Dnn` Property.
If you inherit from this class, you'll automatically have all the properties from [DynamicCode](xref:NetCode.DynamicCode.Index).

Because of this, the documentation here only shows `Dnn` - for all other properties go to [Custom.Hybrid.Code12](xref:Custom.Hybrid.Code12)

> [!TIP]
> If you don't need these special properties, we strongly suggest to move to the Hybrid implementation.
> If you don't need the `Dnn` object, we strongly suggest to move to the Hybrid implementation.
>
> The latest Hybrid base classes also have many new features and are easier to use.
> See [](xref:Custom.Hybrid) for more information.
12 changes: 7 additions & 5 deletions 2sxc Docs Generator/api/dot-net/Custom/Dnn/Razor12.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
uid: Custom.Dnn.Razor12
summary: Base Class for Dynamic CSharp Classes in Dnn
summary: Base Class for Dynamic CSharp Razor in Dnn ☢️ only.
---

### Class Custom.Dnn.Razor12 for Dnn ☢️

This is the Dnn specific base class. It's the very same as `Custom.Hybrid.Razor12` except for the additional `Dnn` and `Code` Property.
This is the Dnn specific base class. It's the very same as `Custom.Hybrid.Razor12` except for the additional `Dnn`.
If you inherit from this class, you'll automatically have all the properties from [DynamicCode](xref:NetCode.DynamicCode.Index).

Because of this, the documentation here only shows `Dnn` - for all other properties go to [Custom.Hybrid.Razor12](xref:Custom.Hybrid.Razor12)

> [!TIP]
> If you don't need these special properties, we strongly suggest to move to the Hybrid implementation.
> If you don't need the `Dnn` object, we strongly suggest to move to the Hybrid implementation.
>
> The latest Hybrid base classes also have many new features and are easier to use.
> See [](xref:Custom.Hybrid) for more information.
34 changes: 7 additions & 27 deletions 2sxc Docs Generator/api/dot-net/Custom/Dnn/_Dnn.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
---
uid: Custom.Dnn
summary: Base classes for custom Razor / C# which only runs on Dnn ☢️.
# title: Custom.Dnn Namespace
title: Custom.Dnn Namespace for Dnn ☢️
---

# Custom.Dnn Namespace for Dnn ☢️

This contains all the base classes for your own solutions, which are targeted to Dnn ☢️.

## Versioned Base Classes

All the base classes in this have a version number, so it will become easier to document differences between versions and also to give guidance how to upgrade in case of future breaking changes or security issues.

## Previous Base Classes

Previously other base classes were recommended. They will continue to work, but we'll only enhance the features on these base classes. To see previous base classes, check out

* #todoc


### Classes

#### [Api12](xref:Custom.Dnn.Api12)

The base class for APIs which only need to work in Dnn. They internally inherit from [DnnApiController](https://dnndocs.com/api/DotNetNuke.Web.Api.DnnApiController.html) which inherits from `ApiController` [System.Web.Http.ApiController](https://docs.microsoft.com/en-us/dotnet/api/system.web.http.apicontroller) and in addition to all the [DynamicCode](xref:NetCode.DynamicCode.Index) properties also have all the features of that base class.

#### [Code12](xref:Custom.Dnn.Code12)

The base class for custom code. If you inherit from this class, you'll automatically have all the properties from [DynamicCode](xref:NetCode.DynamicCode.Index).

#### [Razor12](xref:Custom.Dnn.Razor12)

The base class for custom Razor. If you inherit from this class, you'll automatically have all the properties from [DynamicCode](xref:NetCode.DynamicCode.Index).
> [!TIP]
> Code created with these base classes will _not_ work in Oqtane 🩸.
> Because of this, we recommend to use the [Hybrid](xref:Custom.Hybrid) namespace.
>
> Note that the Hybrid namespace is also compatible with Dnn ☢️,
> and the classes there have more features and are easier to use.
4 changes: 1 addition & 3 deletions 2sxc Docs Generator/api/dot-net/Custom/Hybrid/_Hybrid.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
uid: Custom.Hybrid
summary: Recommended Base Classes for all your Razor and C# files which work on Dnn ☢️ & Oqtane 🩸.
# title: Custom.Hybrid Namespace
title: Custom.Hybrid Namespace Dnn ☢️ & Oqtane 🩸
---

# Custom.Hybrid Namespace Dnn ☢️ & Oqtane 🩸

This contains all the _hybrid_ base classes for your own solutions.
They are meant to work across platforms (Dnn ☢️, Oqtane 🩸, NopCommerce 🔵 etc.)

Expand Down
17 changes: 17 additions & 0 deletions 2sxc Docs Generator/api/dot-net/Custom/_Custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
uid: Custom
summary: The starting point for custom code in your App for both Dnn ☢️ & Oqtane 🩸.
title: Custom Namespace for Dnn ☢️ & Oqtane 🩸
---

## Latest Recommended Base Classes

> [!TIP]
> This area contains all the latest base classes.
> For compatibility reasons, it also contains older base classes which continue to work.
> We recommend to use the latest base classes, as they are more powerful and easier to use.
1. Razor: use [](xref:Custom.Hybrid.RazorTyped)
1. C# Code: use [](xref:Custom.Hybrid.CodeTyped)
1. API: use [](xref:Custom.Hybrid.ApiTyped)
1. Custom DataSource: use [](xref:Custom.DataSource.DataSource16)
22 changes: 22 additions & 0 deletions 2sxc Docs Generator/pages/guides/vscode/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,28 @@ We haven't been able to verify or simplify this, but if you're having trouble,
do read the blog post by [Accuraty](https://www.accu4.com/H2R2S/VS-Code-IntelliSense) as well.


## Warnings when Using IntelliSense

> [!WARNING]
> IntelliSense can show you _internal_ APIs which will change over time.
IntelliSense is an amazing productivity boost, but you should avoid using internal APIs.

To make this unlikely, we spent a LOT of time to clearly mark internal stuff.
Avoid the following:

1. Almost everything in the `ToSic.Eav.*` namespace is usually internal, so avoid using it
1. Exception: `ToSic.Eav.DataSource` and `ToSic.Eav.DataSources` are really public
1. Anything in a `*.Internal` namespace
1. Anything in a `*.Integration` namespace
1. Anything in a `*.Backend` namespace
1. Anything in a `*.Sys` namespace
1. Anything marked with `[Obsolete]`
1. Anything marked with `[EditorBrowsable(EditorBrowsableState.Never)]` - IntelliSense will not show these APIs
1. Properties beginning with an underscore, eg `_Something`



## Configure an App for JavaScript IntelliSense

TODO: this is not yet documented
Expand Down
32 changes: 16 additions & 16 deletions docs/api/dot-net/Custom.DataSource.DataSource16.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>

<h1 id="Custom_DataSource_DataSource16" data-uid="Custom.DataSource.DataSource16" class="text-break">
Class DataSource16
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSources16_IDataSourceExplicit.cs/#L13"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSources16_IDataSourceExplicit.cs/#L7"><i class="bi bi-code-slash"></i></a>
</h1>

<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Custom.html">Custom</a>.<a class="xref" href="Custom.DataSource.html">DataSource</a></dd></dl>
<dl><dt>Assembly</dt><dd>ToSic.Sxc.dll</dd></dl>
</div>

<div class="markdown summary"><p>The Base Class for any Dynamic DataSources.</p>
<div class="markdown summary"><p>The Base Class for custom Dynamic DataSources in your App.</p>
</div>
<div class="markdown conceptual"></div>

Expand Down Expand Up @@ -173,7 +173,7 @@ <h2 class="section" id="constructors">Constructors

<h3 id="Custom_DataSource_DataSource16__ctor_Custom_DataSource_DataSource16_MyServices_System_String_" data-uid="Custom.DataSource.DataSource16.#ctor(Custom.DataSource.DataSource16.MyServices,System.String)">
DataSource16(MyServices, string)
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L49"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L45"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>Constructor with the option to provide a log name.</p>
Expand Down Expand Up @@ -213,7 +213,7 @@ <h2 class="section" id="properties">Properties

<h3 id="Custom_DataSource_DataSource16_AppId" data-uid="Custom.DataSource.DataSource16.AppId">
AppId
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L87"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L83"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>The app id as used internally</p>
Expand Down Expand Up @@ -246,7 +246,7 @@ <h4 class="section">Property Value</h4>

<h3 id="Custom_DataSource_DataSource16_Configuration" data-uid="Custom.DataSource.DataSource16.Configuration">
Configuration
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L81"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L77"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>The configuration system of this data source.
Expand Down Expand Up @@ -280,7 +280,7 @@ <h4 class="section">Property Value</h4>

<h3 id="Custom_DataSource_DataSource16_Error" data-uid="Custom.DataSource.DataSource16.Error">
Error
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L83"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L79"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>Special helper to generate error-streams.</p>
Expand Down Expand Up @@ -313,7 +313,7 @@ <h4 class="section">Property Value</h4>

<h3 id="Custom_DataSource_DataSource16_Kit" data-uid="Custom.DataSource.DataSource16.Kit">
Kit
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L57"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L53"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"></div>
Expand Down Expand Up @@ -344,7 +344,7 @@ <h4 class="section">Property Value</h4>

<h3 id="Custom_DataSource_DataSource16_Link" data-uid="Custom.DataSource.DataSource16.Link">
Link
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSources16_IDataSourceExplicit.cs/#L42"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSources16_IDataSourceExplicit.cs/#L36"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>A link - or possibly many.
Expand Down Expand Up @@ -377,7 +377,7 @@ <h4 class="section">Property Value</h4>

<h3 id="Custom_DataSource_DataSource16_Log" data-uid="Custom.DataSource.DataSource16.Log">
Log
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L74"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L70"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>The logger for the current Razor / WebApi which allows you to add logs to Insights.</p>
Expand Down Expand Up @@ -409,7 +409,7 @@ <h4 class="section">Property Value</h4>

<h3 id="Custom_DataSource_DataSource16_ZoneId" data-uid="Custom.DataSource.DataSource16.ZoneId">
ZoneId
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L85"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L81"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>ID of the zone (EAV Tenant)</p>
Expand Down Expand Up @@ -446,7 +446,7 @@ <h2 class="section" id="methods">Methods

<h3 id="Custom_DataSource_DataSource16_GetDefault" data-uid="Custom.DataSource.DataSource16.GetDefault">
GetDefault()
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L59"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L55"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"></div>
Expand Down Expand Up @@ -477,7 +477,7 @@ <h4 class="section">Returns</h4>

<h3 id="Custom_DataSource_DataSource16_ProvideOut_System_Func_System_Object__ToSic_Lib_Coding_NoParamOrder_System_String_System_Func_ToSic_Eav_Data_Build_DataFactoryOptions__" data-uid="Custom.DataSource.DataSource16.ProvideOut(System.Func{System.Object},ToSic.Lib.Coding.NoParamOrder,System.String,System.Func{ToSic.Eav.Data.Build.DataFactoryOptions})">
ProvideOut(Func&lt;object&gt;, NoParamOrder, string, Func&lt;DataFactoryOptions&gt;)
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L62"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L58"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"></div>
Expand Down Expand Up @@ -514,7 +514,7 @@ <h4 class="section">Parameters</h4>

<h3 id="Custom_DataSource_DataSource16_Setup_ToSic_Eav_DataSource_IDataSourceOptions_ToSic_Eav_DataSource_IDataSourceLinkable_" data-uid="Custom.DataSource.DataSource16.Setup(ToSic.Eav.DataSource.IDataSourceOptions,ToSic.Eav.DataSource.IDataSourceLinkable)">
Setup(IDataSourceOptions, IDataSourceLinkable)
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSources16_IDataSourceExplicit.cs/#L31"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSources16_IDataSourceExplicit.cs/#L25"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"></div>
Expand Down Expand Up @@ -547,7 +547,7 @@ <h4 class="section">Parameters</h4>

<h3 id="Custom_DataSource_DataSource16_TryGetIn_System_String_" data-uid="Custom.DataSource.DataSource16.TryGetIn(System.String)">
TryGetIn(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L95"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L91"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"></div>
Expand Down Expand Up @@ -583,7 +583,7 @@ <h4 class="section">Returns</h4>

<h3 id="Custom_DataSource_DataSource16_TryGetOut_System_String_" data-uid="Custom.DataSource.DataSource16.TryGetOut(System.String)">
TryGetOut(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L98"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSource16.cs/#L94"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"></div>
Expand Down Expand Up @@ -619,7 +619,7 @@ <h4 class="section">Returns</h4>
</article>

<div class="contribution d-print-none">
<a href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSources16_IDataSourceExplicit.cs/#L13" class="edit-link">Edit this page</a>
<a href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.DataSources/DataSources16_IDataSourceExplicit.cs/#L7" class="edit-link">Edit this page</a>
</div>


Expand Down
6 changes: 3 additions & 3 deletions docs/api/dot-net/Custom.DataSource.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>

<h1 id="Custom_DataSource" data-uid="Custom.DataSource" class="text-break">Namespace Custom.DataSource
</h1>
<div class="markdown level0 summary"><p>Classes to inherit from when creating custom DataSources in Dnn ☢️ &amp; Oqtane 🩸.</p>
<div class="markdown level0 summary"><p>Base classes for your custom DataSources in Dnn ☢️ &amp; Oqtane 🩸.</p>
</div>
<div class="markdown level0 conceptual"><h1 id="customdatasource-namespace-dnn---oqtane-">Custom.DataSource Namespace Dnn ☢️ &amp; Oqtane 🩸</h1>
<div class="markdown level0 conceptual">
<p>This contains all the base classes for your own DataSources.</p>
</div>
<div class="markdown level0 remarks"></div>
Expand All @@ -123,7 +123,7 @@ <h3 id="classes">
</h3>
<dl class="jumplist">
<dt><a class="xref" href="Custom.DataSource.DataSource16.html">DataSource16</a></dt>
<dd><p>The Base Class for any Dynamic DataSources.</p>
<dd><p>The Base Class for custom Dynamic DataSources in your App.</p>
</dd>
</dl>

Expand Down
Loading

0 comments on commit 89ed7e5

Please sign in to comment.