Skip to content

Commit

Permalink
reduce build warnings, add Code.Generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iJungleboy committed Mar 19, 2024
1 parent 2c89acd commit 722c60b
Show file tree
Hide file tree
Showing 83 changed files with 4,301 additions and 189 deletions.
4 changes: 2 additions & 2 deletions 2sxc Docs Generator/api/dot-net/ToSic.Sxc/Data/Sxc.Data.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
uid: ToSic.Sxc.Data
---

The dynamic data system used in 2sxc. It's primary purpose is to ensure that you can easily
The dynamic data system used in 2sxc. It's primary purpose is to ensure that you can easily
use dynamic objects to write templates, tokens and more. we have two different topics covered:

1. Dynamic Entities to simplify code using [](xref:ToSic.Eav.Data.IEntity) objects - [](xref:ToSic.Sxc.Data.IDynamicEntity) and [](xref:ToSic.Sxc.Data.DynamicEntity)
1. Dynamic Jackets to simplify code using JSON - [](xref:ToSic.Sxc.Data.DynamicJacket)s and [](xref:ToSic.Sxc.Data.DynamicJacketList)s
1. Dynamic Jackets to simplify code using JSON - `ToSic.Sxc.Data.DynamicJacket`s and `ToSic.Sxc.Data.DynamicJacketList`s
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ uid: ToSic.Sxc.Dnn.LookUp
summary: *content
---

This extends the abilities of [](xref:ToSic.Eav.LookUp) with more look-up objects for things that are
either Dnn specific. For example, [](xref:ToSic.Sxc.Dnn.LookUp.DnnLookUpEngineResolver) retrieves all the LookUps relevant for the current module, to resolve `Module:ModuleId` etc.
This extends the abilities of [](xref:ToSic.Eav.LookUp) with more look-up objects for things that are
either Dnn specific. For example, `ToSic.Sxc.Dnn.LookUp.DnnLookUpEngineResolver` retrieves all the LookUps relevant for the current module, to resolve `Module:ModuleId` etc.
6 changes: 3 additions & 3 deletions 2sxc Docs Generator/api/dot-net/ToSic.Sxc/Sxc.Blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ uid: ToSic.Sxc.Blocks
summary: *content
---

A unit of output it 2sxc is called a **Block**. In Dnn-Link, this can be like a _Module_, except that blocks can be inside other blocks.
A unit of output it 2sxc is called a **Block**. In Dnn-Link, this can be like a _Module_, except that blocks can be inside other blocks.

Looking at it from the Platform like Dnn, the entry object is an ICmsBlock which contains context information (in Dnns case, ModuleId etc.). Inside it is an IBlock which can itself contain more IBlocks.
Looking at it from the Platform like Dnn, the entry object is an ICmsBlock which contains context information (in Dnn's case, ModuleId etc.). Inside it is an IBlock which can itself contain more IBlocks.

Note that each _Block_ itself has _Views_ [](xref:ToSic.Sxc.Blocks.IView) and data specific to that block.
Note that each _Block_ itself has _Views_ [](xref:ToSic.Sxc.Context.ICmsView) and data specific to that block.
35 changes: 19 additions & 16 deletions 2sxc Docs Generator/api/dot-net/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,32 @@ uid: ToSic.Home
# 2sxc .net API Docs

> [!TIP]
> This that will probably interest you the most:
> This that will probably interest you the most.
1. Recommended Base Classes for Razor / C# / Api Controllers
* [](xref:Custom.Hybrid.RazorTyped) for hybrid Razor
* [](xref:Custom.Hybrid.ApiTyped) for hybrid WebAPIs
* [](xref:Custom.Hybrid.CodeTyped) for hybrid shared C# code
* [](xref:Custom.DataSource.DataSource16) for custom DataSources
## Recommended Base Classes for Razor / C# / Api Controllers

2. Most of the Service you'll use on the `Kit` object
* [Kit of Typed Code](xref:ToSic.Sxc.Services.ServiceKit16) and [Kit of Razor14](xref:ToSic.Sxc.Services.ServiceKit14)
* [](xref:ToSic.Sxc.Services) - all the services you will usually use
* [](xref:ToSic.Sxc.Context) - any kind of context, like the current page and url-parameters
* [](xref:Custom.Hybrid.RazorTyped) for hybrid Razor
* [](xref:Custom.Hybrid.ApiTyped) for hybrid WebAPIs
* [](xref:Custom.Hybrid.CodeTyped) for hybrid shared C# code
* [](xref:Custom.DataSource.DataSource16) for custom DataSources

3. Most important Data-Objects
* [](xref:ToSic.Sxc.Data.ITypedItem) - for all the data objects in RazorTyped
* [](xref:ToSic.Sxc.Data) - namespace for all 2sxc Data
* [](xref:ToSic.Sxc.Adam.IFolder), [](xref:ToSic.Sxc.Adam.IFile) and [](xref:ToSic.Sxc.Adam) for working with files
## Most used Services and Context Information

* Service Kit: [Kit of Typed Code](xref:ToSic.Sxc.Services.ServiceKit16) and [Kit of Razor14](xref:ToSic.Sxc.Services.ServiceKit14)
* [](xref:ToSic.Sxc.Services) - all the services you will usually use
* [](xref:ToSic.Sxc.Context) - all context info, like the current page and url-parameters

## Most important Data-Objects

* [](xref:ToSic.Sxc.Data.ITypedItem) - for all the data objects in RazorTyped
* [](xref:ToSic.Sxc.Data) - namespace for all 2sxc Data
* [](xref:ToSic.Sxc.Adam.IFolder), [](xref:ToSic.Sxc.Adam.IFile) and [](xref:ToSic.Sxc.Adam) for working with files


## Note About Internal APIs

Note also that the real code of EAV/2sxc/Dnn has way more stuff, but that's inofficial.
Please don't use objects that are not documented here.
Please don't use objects that are not documented here - or they are explicitly on an `.Internal` namespace.
That allows us to improve the architecture without worrying about breaking your code.
Once we're really sure that certain parts are very final, we'll publish the API docs for those parts.

Expand All @@ -41,4 +44,4 @@ Once we're really sure that certain parts are very final, we'll publish the API

### Programming with DataSources and VisualQuery

All the DataSources are based on [](xref:ToSic.Eav.DataSource.IDataSource)<!-- and most of them are also [](xref:ToSic.Eav.DataSource.IDataSourceTarget)s -->. You can find most of them in [](xref:ToSic.Eav.DataSources) .
All the DataSources are based on [](xref:ToSic.Eav.DataSource.IDataSource). You can find most of them in [](xref:ToSic.Eav.DataSources) .
4 changes: 2 additions & 2 deletions 2sxc Docs Generator/pages/abyss/parts/look-up/engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ Usually LookUp Engines will receive a long list (Dictionary) of things to look u

LookUp Engines all implement the [](xref:ToSic.Eav.LookUp.ILookUpEngine) interface and should inherit the `LookUpEngine` object.

LookUpEngine objects are provided with DepedencyInjection. The system that gets the currently valid LookUpEngine inherits the [](xref:ToSic.Eav.LookUp.ILookUpEngineResolver).
LookUpEngine objects are provided with DependencyInjection. The system that gets the currently valid LookUpEngine inherits the [](xref:ToSic.Eav.LookUp.ILookUpEngineResolver).



## Also Read #todoc
## Also Read

* [](xref:Abyss.Parts.LookUp.Index)
* [](xref:Abyss.Parts.LookUp.Tokens)
Expand Down
2 changes: 1 addition & 1 deletion 2sxc Docs Generator/pages/abyss/parts/look-up/sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Just to give you an idea of the power of LookUp objects, here are some in use:
<!-- 1. [](xref:ToSic.Eav.LookUp.LookUpInMetadata) - will get values from Metadata of something -->
1. [](xref:ToSic.Eav.LookUp.LookUpInLookUps) - will look up values in various attached LookUp objects
1. [](xref:ToSic.Eav.LookUp.LookUpInDataTarget) - will look up a value from an `In` stream of a DataSource
1. [](xref:ToSic.Sxc.Dnn.LookUp.LookUpInDnnPropertyAccess) - will look up stuff in Dnn specific PropertyAccess objects, which are similar to LookUp objects
1. `ToSic.Sxc.Dnn.LookUp.LookUpInDnnPropertyAccess` - will look up stuff in Dnn specific PropertyAccess objects, which are similar to LookUp objects
1. [](xref:ToSic.Eav.LookUp.LookUpInEntity) - will look up things in an IEntity and also provide more information like Count, IsFirst, etc. for the Token Engine

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ In Razor and WebApi there are always built-in methods to get data sources, speci
1. `CreateSource(...)`
1. `CreateSource<T>(...)`

See [docs](xref:ToSic.Sxc.Code.DynamicCode.CreateSource*)
See [e.g. docs](xref:Custom.Hybrid.Razor12.CreateSource*)

If you need this in a DLL then these will be missing. For that, please ensure your classes also use DependencyInjection and are created from code which uses DI.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ uid: Abyss.Releases.History.V13.EavFactory

**Keywords:** #Deprecated #Factory #Build #DependencyInjection

2sxc v13 cleans up some historic, deprecated functionality. They were not used much, but if you have code which used this, here's how to fix any code in production.
2sxc v13 cleans up some historic, deprecated functionality. They were not used much, but if you have code which used this, here's how to fix any code in production.

The `ToSic.Eav.Factory.Resolve<T>()` is being deprecated, and will be removed in v14. In v13 it was moved to the Dnn DLL because it shoudn't be used anywhere else.
The `ToSic.Eav.Factory.Resolve<T>()` is being deprecated, and will be removed in v14. In v13 it was moved to the Dnn DLL because it shoudn't be used anywhere else.

## Reason for Removal

2sxc used to be the first and only Module in Dnn which supported Dependency Injection, so there was a need to patch this in somehow.
2sxc used to be the first and only Module in Dnn which supported Dependency Injection, so there was a need to patch this in somehow.

The solution we used was to have static object `ToSic.Eav.Factory` which managed this, but this is actually bad practice and encourages bad code.
The solution we used was to have static object `ToSic.Eav.Factory` which managed this, but this is actually bad practice and encourages bad code.

We believe this is rarely used, so we removed it. But it was in the official docs, so there may have been a few users who picked this up.

Expand All @@ -29,7 +29,7 @@ var convertService = ToSic.Eav.Factory.Resolve<IConvertService>();

## What we Changed

In 2sxc 11.11 we introduced the `GetService<T>()` ([docs](xref:ToSic.Sxc.Code.IDynamicCode.GetService*)) which takes care of this.
In 2sxc 11.11 we introduced the `GetService<T>()` ([e.g. docs](xref:Custom.Hybrid.Razor12.GetService*)) which takes care of this.
Please use this from now on.

The old API will be disabled disabled and will show an error pointing to this documentation.
Expand All @@ -55,4 +55,4 @@ If you were using this from outside of 2sxc Razor / WebApi, you will need to use

---

Shortlink to here: https://go.2sxc.org/brc-13-eav-factory
Shortlink to here: <https://go.2sxc.org/brc-13-eav-factory>
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ uid: Abyss.Releases.History.V13.StaticRender

**Keywords:** #Deprecated #Render #Static #DependencyInjection

2sxc v13 cleans up some historic, deprecated functionality. They were not used much, but if you have code which used this, here's how to fix any code in production.
2sxc v13 cleans up some historic, deprecated functionality. They were not used much, but if you have code which used this, here's how to fix any code in production.

These two commands for rendering Inner Content are being deprecated and will be removed in v14. In v13 it was moved to the Dnn DLL because it shoudn't be used anywhere else.
These two commands for rendering Inner Content are being deprecated and will be removed in v14. In v13 it was moved to the Dnn DLL because it shoudn't be used anywhere else.

* `ToSic.SexyContent.ContentBlocks.One(...)`
* `ToSic.SexyContent.ContentBlocks.All(...)`
Expand All @@ -17,9 +17,9 @@ These two commands for rendering Inner Content are being deprecated and will be

## Reason for Removal

2sxc used to not have Dependency Injection so there were some static APIs which we provided.
But this is bad practice and causes a lot of difficulty to keep everything working.
The newer APIs use Services and Dependency Injection and do what they should.
2sxc used to not have Dependency Injection so there were some static APIs which we provided.
But this is bad practice and causes a lot of difficulty to keep everything working.
The newer APIs use Services and Dependency Injection and do what they should.

## History - How it Used to Work

Expand All @@ -33,11 +33,11 @@ Previously you could write code like this in your Razor:

## What we Changed

In 2sxc 11.11 we introduced the `GetService<T>()` ([docs](xref:ToSic.Sxc.Code.IDynamicCode.GetService*)) which provides proper DI.
In 2sxc 11.11 we introduced the `GetService<T>()` ([e.g. docs](xref:Custom.Hybrid.Razor12.GetService*)) which provides proper DI.
We also introduced a `ToSic.Sxc.Services.IRenderService` which should replace these commands - see [docs](xref:ToSic.Sxc.Services.IRenderService).
Please use this from now on.

The old API will continue to work for a while but show errors in the insight.
The old API will continue to work for a while but show errors in the insight.


## Upgrade to Newer functionality
Expand All @@ -63,4 +63,4 @@ var renderSvc = GetService<IRenderService>();

---

Shortlink to here: https://go.2sxc.org/brc-13-static-render
Shortlink to here: <https://go.2sxc.org/brc-13-static-render>
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Previously you could write code like this in your Razor:

## What we Changed

In 2sxc 11.11 we introduced the `GetService<T>()` ([docs](xref:ToSic.Sxc.Code.IDynamicCode.GetService*)) which provides proper DI.
In 2sxc 11.11 we introduced the `GetService<T>()` ([docs](xref:Custom.Hybrid.Razor12.GetService*)) which provides proper DI.
We also introduced a `ToSic.Sxc.Services.IRenderService` which should replace these commands - see [docs](xref:ToSic.Sxc.Services.IRenderService).
Please use this from now on.

Expand Down
Loading

0 comments on commit 722c60b

Please sign in to comment.