Add GlobalUsings.cs automatically for C#10 - plugins

I would like to have an option in VS (or VSCode) to automatically add a GlobalUsings.cs file containing all (or selected) using statements in a project. (for > C# 10)
Does this option exist or is it under development somewhere?
exemple :
file MyTests1.cs
using Xunit;
using Moq;
using Shouldly;
using System;
file MyTests2.cs
using Xunit;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
file GlobalUsings.cs will have
global using Xunit;
global using Moq;
global using Shouldly;
global using System;
global using System.Collections.Generic;
global using System.Linq;
global using System.Threading.Tasks;
and each other cs files will have using statement removed

Related

How to access .onion address with client-authentication using wget

I'm trying to share a file between two servers using onionshare.cli. I can get it working using the GUI. The only problem is trying to do it through the CLI. I can also get it working when using the onionshare.cli --public flag.
The issue is trying to get torsocks wget on an onion address that requires a private key for client-authentication. How do I pass the private key when using wget.
Sending Machine
Receiving machine

Using the Azure Management Fluent Apis. I would like like to deploy an azure function including the zipped code. Is that possible?

I know how to create the app service plan . I need to be able to deploy the code and the configuration.
Yes, it is possible to create a function app using Azure Management Fluent Api.
You can use the below ifunctionapp interface to create the function app using fluent api's:
public interface IFunctionApp :
Microsoft.Azure.Management.AppService.Fluent.IWebAppBase,
Microsoft.Azure.Management.ResourceManager.Fluent.Core.IBeta,
Microsoft.Azure.Management.ResourceManager.Fluent.Core.IGroupableResource<Microsoft.Azure.Management.AppService.Fluent.IAppServiceManager,Microsoft.Azure.Management.AppService.Fluent.Models.SiteInner>,
Microsoft.Azure.Management.ResourceManager.Fluent.Core.IHasInner<Microsoft.Azure.Management.AppService.Fluent.Models.SiteInner>,
Microsoft.Azure.Management.ResourceManager.Fluent.Core.IHasManager<Microsoft.Azure.Management.AppService.Fluent.IAppServiceManager>,
Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.IRefreshable<Microsoft.Azure.Management.AppService.Fluent.IFunctionApp>,
Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.IUpdatable<Microsoft.Azure.Management.AppService.Fluent.FunctionApp.Update.IUpdate>
using the "IWithPackageUri.WithPackageUri(String) Method" by specifing the zipped packed to deploy
public Microsoft.Azure.Management.AppService.Fluent.WebDeployment.Definition.IWithExecute WithPackageUri (string packageUri);

Codeigniter session is not working on PHP 7.3.0

I am using codeigniter version 3.1.10 on PHP 7.3.0.when i am setting and retriving sesssion from same method means it will work. when try to accesss session from different method from the same controller and
from different controller will not work.
this is how i set the session
$this->session->set_userdata('somename','10');
get session
$this->session->userdata('somename');

How to connect to WSUS server using WSUS remote API from a web API?

I am trying to connect to WSUS server remotely from my web application built in ASP.NET Core 2.0. I am using the Microsoft.UpdateServices.Administration.dll to achieve this. I was able to establish successful connection to the server when I built a C# console application and used the same dll file in assembly reference.
I have referred to these similar posts but I have not found an answer yet.
- Is there RESTful webservice calls avaible in WSUS
- How to make a SOAP call to WSUS Server
[I am sorry for not maintaining indentation and proper formatting in the sample code.]
Below is the sample code from the console app which worked:
using System;
using System.Reflection;
using Microsoft.UpdateServices.Administration;
namespace WsusRemoteConnectivityConsoleApp
{
class Program
{
static void Main(string[] args)
{
IUpdateServer remoteServer =
AdminProxy.GetUpdateServer("WsusServer1",false,8530);
Console.WriteLine(remoteServer.Name);
}
}
}
The expected output as well as the actual output in the console app is "WsusServer1".
But using the same line of code in the web app, I am not able to connect to the WSUS server. I receive exception saying that "The requested security protocol is not supported" in this line
IUpdateServer remoteServer =
AdminProxy.GetUpdateServer("WsusServer1",false,8530);
Any help is appreciated.
Thanks.
if you have setup SSL, you should use:
AdminProxy.GetUpdateServer("WsusServer1",true,8531);

Axios as library parameter in config file

Is there any need of/or any support for Axios as library parameter in config file while generating client stub using swagger-codegen?
If you are using VueJs and Axios, there is a swagger-codegen for that:
https://github.com/chenweiqun/swagger-vue
Just run in update api-docs url and run in node.