syntixi
Source generator to embed SyncFusion License Key from an environment variable
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.0%) to scientific vocabulary
Keywords
Repository
Source generator to embed SyncFusion License Key from an environment variable
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
- Releases: 1
Topics
Metadata Files
README.md
Syntixi
Mission Statement
- To provide a mechanism to embed Syncfusion license keys into applications as part of the build process.
Introduction
Syntixi is a Roslyn Source Generator that picks up the license key in a way that: * allows the key to not be stored in source control * allows the embedding without the direct modification of the source code, again preventing the risk of the key accidentally ending up in source control. * Syncfusion has a couple of batch scripts that can be embedded into your csproj but these do alter the source code and do it a slightly blind fashion.
Getting Started
You will need a Syncfusion license key
1. Create an application (such as WPF)
2. Add a nuget package reference to "Syntixi.Attributes" and "Syntixi.SourceGenerator" in your project
xml
<PackageReference Include="Syntixi.Attributes" Version="1.0.18" />
<PackageReference Include="Syntixi.SourceGenerator" Version="1.0.18">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
This will add an attributes package and the source generator package. NOTE: if you don't include the build assets for the SourceGenerator it will not make the props file available that allows Roslyn to access the SyncFusion environment variable \ secret.
3. Add the following initialisation for the Syncfusion license manager
cs
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(SYNCFUSION_LICENSE_KEY);
4. Mark the class hosting the logic as partial and add the attribute to the class
cs
/// <summary>
/// WPF Application entry point.
/// </summary>
[Syntixi.Attributes.EmbedSyncfusionLicenseKey]
public partial class App : Application
{
// YOUR CODE HERE
}
5. Add the license key to a CI secret or your local environment variables.
???
longer examples
Full example that will fail if the license key isn't present
The source generator is written to set a Diagnostic Error if the attribute is included but the license key isn't present in the environment.
cs
/// <summary>
/// WPF Application entry point.
/// </summary>
[Syntixi.Attributes.EmbedSyncfusionLicenseKey]
public partial class App : Application
{
/// <summary>
/// Initializes a new instance of the <see cref="App"/> class.
/// </summary>
public App()
{
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(SYNCFUSION_LICENSE_KEY);
}
}
Full example that will not include the Syncfusion license manager if they license key isn't present.
The source generator has a .props file includes the compiler directive SYNTIXI_SYNCFUSION_LICENSE_KEY.
```cs
///
if SYNTIXISYNCFUSIONLICENSE_KEY
[Syntixi.Attributes.EmbedSyncfusionLicenseKey]
endif
public partial class App : Application
{
/// <summary>
/// Initializes a new instance of the <see cref="App"/> class.
/// </summary>
public App()
{
if SYNTIXISYNCFUSIONLICENSE_KEY
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(SYNCFUSION_LICENSE_KEY);
endif
}
}
```
Viewing the documentation
The documentation can be found at https://docs.dpvreony.com/projects/syntixi/
Contributing to the code
See the contribution guidelines.
Owner
- Name: David Vreony
- Login: dpvreony
- Kind: user
- Location: UK
- Website: http://www.dpvreony.co.uk
- Repositories: 39
- Profile: https://github.com/dpvreony
.NET Developer \ Analyst \ Architect with experience in Developer Experience, Financial Services and Healthcare domains
Citation (citation.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Dovetail
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: David
family-names: Vreony
orcid: 'https://orcid.org/0000-0001-6855-0779'
repository-code: 'https://github.com/dpvreony/dovetail'
license: MIT
GitHub Events
Total
- Watch event: 1
- Delete event: 53
- Issue comment event: 65
- Push event: 85
- Pull request review event: 34
- Pull request event: 101
- Create event: 53
Last Year
- Watch event: 1
- Delete event: 53
- Issue comment event: 65
- Push event: 85
- Pull request review event: 34
- Pull request event: 101
- Create event: 53
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| renovate[bot] | 2****] | 40 |
| David Vreony | d****y | 30 |
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 1
- Total pull requests: 121
- Average time to close issues: N/A
- Average time to close pull requests: 7 days
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.62
- Merged pull requests: 88
- Bot issues: 1
- Bot pull requests: 112
Past Year
- Issues: 0
- Pull requests: 97
- Average time to close issues: N/A
- Average time to close pull requests: 10 days
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.52
- Merged pull requests: 64
- Bot issues: 0
- Bot pull requests: 91
Top Authors
Issue Authors
- renovate[bot] (6)
Pull Request Authors
- renovate[bot] (153)
- dpvreony (11)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- nuget 2,074 total
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 3
- Total maintainers: 1
nuget.org: syntixi.attributes
Syntixi is a Roslyn source generation toolkit for embedding a Syncfusion license key into your build without exposing it to source control.
- License: MIT
-
Latest release: 1.0.18
published almost 2 years ago
Rankings
Maintainers (1)
nuget.org: syntixi
Syntixi is a Roslyn source generation toolkit for embedding a Syncfusion license key into your build without exposing it to source control.
- License: MIT
-
Latest release: 1.0.18
published almost 2 years ago
Rankings
Maintainers (1)
nuget.org: syntixi.sourcegenerator
Syntixi is a Roslyn source generation toolkit for embedding a Syncfusion license key into your build without exposing it to source control.
- License: MIT
-
Latest release: 1.0.18
published almost 2 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout 692973e3d937129bcbf40652eb9f2f61becf3332 composite
- actions/create-release v1 composite
- actions/download-artifact v4 composite
- actions/setup-dotnet v4 composite
- actions/setup-java v4 composite
- actions/upload-artifact v4 composite
- crazy-max/ghaction-virustotal v4 composite
- dotnet/nbgv master composite
- glennawatson/ChangeLog v1 composite
- microsoft/setup-msbuild 767f00a3f09872d96a0cb9fcd5e6a4ff33311330 composite
- actions/checkout v4 composite
- actions/setup-dotnet v4 composite
- github/codeql-action/analyze v3 composite
- github/codeql-action/init v3 composite
- glennawatson/setup-msbuild v1.0.3 composite
- dessant/lock-threads v5 composite
- Microsoft.CodeAnalysis.CSharp 4.10.0