Small help with immutable types...
// private readonly int _age;
// public int Age { get { return _age; } }
public int Age { get; }
#LINK 1Password secrets to the environment variables | |
$ENV:FL_SP_CLIENT_ID = "op://Factorlabs/Factorlabs Service Principal for 1password demo/username" | |
$ENV:FL_SP_CLIENT_SECRET = "op://Factorlabs/Factorlabs Service Principal for 1password demo/password" | |
$client_id = $env:FL_SP_CLIENT_ID | |
$client_secret = $env:FL_SP_CLIENT_SECRET | |
$tenant_id = "6790fadf-1111-4f73-8f65-844675b9a99a" | |
$resource = [uri]::EscapeDataString("https://graph.microsoft.com/.default") |
trigger: | |
branches: | |
include: | |
- '*' | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- task: AzureResourceManagerTemplateDeployment@3 |
version: '2.1' | |
services: | |
grafana: | |
container_name: grafana | |
image: proxx/grafana-armv7 | |
user: "1000" | |
ports: | |
- 3000:3000 | |
volumes: | |
- /opt/grafana:/etc/grafana:rw |
[InterceptLogger(1)] | |
public class TaskFakeService : ITaskService | |
{ | |
public int GetById(int id) | |
{ | |
return 1; | |
} | |
[InterceptExceptions(2)] | |
public IList<int> GetAll() |
public class InterceptLoggerAttribute : InterceptAttribute | |
{ | |
public InterceptLoggerAttribute(int order) | |
{ | |
this.Order = order; | |
} | |
public override IInterceptor CreateInterceptor(IProxyRequest request) | |
{ |
public class LoggerInterceptor : IInterceptor | |
{ | |
public void Intercept(IInvocation invocation) | |
{ | |
var logger = invocation.Request.Context.Kernel.Get<Logger>(); | |
logger.Trace(string.Format("Start method {0} with {1}", invocation.Request.Method.Name, ArgumentsToString(invocation.Request.Arguments))); | |
invocation.Proceed(); | |
logger.Trace(string.Format("End method {0} with {1}", invocation.Request.Method.Name, invocation.ReturnValue.ToString())); | |
} |
kernel.Bind<ITaskService>().To<TaskService>().Intercept().With<ServiceInterceptor>(); |
function Read-Onet{ | |
param ( | |
[string] $path | |
) | |
asnp *sharepoint* | |
$file = "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\" + "TEMPLATE\" + $path+"\xml\onet.xml"; | |
write-host $file | |
if (Test-Path $file) { | |
[xml]$onet = Get-Content $($file) |