This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- task: Docker@2 | |
displayName: 'Build Api image' | |
inputs: | |
containerRegistry: '$(dockerRegistry)' | |
repository: '$(dockerHub)/$(imageName)' | |
Dockerfile: '$(workingDirectory)/Dockerfile-Api' | |
tags: | | |
$(tag) | |
latest | |
addPipelineData: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.form = this.formBuilder.group({ | |
code: ['', | |
[Validators.required, Validators.pattern('^[A-Za-z0-9]{4}')], | |
this.asyncCodeValidator.validate(), | |
] | |
}); | |
@Injectable({ providedIn: 'root' }) | |
export class AsyncCodeValidatorService { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp3.1</TargetFramework> | |
</PropertyGroup> | |
<PropertyGroup Label="Settings"> | |
<!--produce an assembly whose byte-for-byte output is identical across compilations for identical inputs.--> | |
<Deterministic>true</Deterministic> | |
<DebugSymbols>true</DebugSymbols> | |
<!--Emit debugging information into the .dll--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
read configuration settings before initializing a Host in ASP .NET Core? | |
https://stackoverflow.com/questions/58530942/how-to-read-configuration-settings-before-initializing-a-host-in-asp-net-core#_=_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button (click)="updateValue(+value - 1)">-</button> | |
<input [ngModel]="value" | |
(ngModelChange)="updateValue($event)" | |
type="string"> | |
<button (click)="updateValue(+value + 1)">+</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PropertyGroup Label="Settings"> | |
<!--produce an assembly whose byte-for-byte output is identical across compilations for identical inputs.--> | |
<Deterministic>true</Deterministic> | |
<DebugSymbols>true</DebugSymbols> | |
<!--Emit debugging information into the .dll--> | |
<DebugType>embedded</DebugType> | |
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip> | |
<MinVerVerbosity>detailed</MinVerVerbosity> | |
<IsPackable>false</IsPackable> | |
</PropertyGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DbRepository : IDisposable | |
{ | |
public IDbConnection Connection { get; set; } | |
private bool _disposedValue; | |
protected virtual void Dispose(bool disposing) | |
{ | |
if (!_disposedValue) | |
{ | |
if (disposing) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var someclass = (SomeClass) FormatterServices.GetUninitializedObject(typeof(SomeClass)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace OpenTelemetry.Trace | |
{ | |
/// <summary> | |
/// Extension methods to simplify registering of dependency instrumentation. | |
/// </summary> | |
public static class TracerProviderBuilderExtensions | |
{ | |
/// <summary> | |
/// Enables Microsoft.EntityFrameworkCore instrumentation. | |
/// </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// token to access a stream with the organisation information we need | |
// this is what we inject e.g. @Inject(ORG_INFO) readonly orgInfo$: Observable<string> | |
export const ORG_INFO = new InjectionToken<Observable<string>>( | |
'Organisation name information' | |
); | |
// This is what we add to `providers` array in module or component | |
export const ORGANISATION_PROVIDERS: Provider[] = [ | |
{ | |
provide: ORG_INFO, |
NewerOlder