/// <summary> /// Provides SSIS Component Properties /// </summary> public override void ProvideComponentProperties() { this.ComponentMetaData.Version = PipelineUtils.GetPipelineComponentVersion(this); this.ComponentMetaData.Name = Resources.ColumnsToXMLTransformationName; this.ComponentMetaData.Description = Resources.ColumnsToXMLTransformationDescription; this.ComponentMetaData.ContactInfo = Resources.TransformationContactInfo; // Reset the component. base.RemoveAllInputsOutputsAndCustomProperties(); //call base method to insert input and output base.ProvideComponentProperties(); //Set Input properties IDTSInput input = ComponentMetaData.InputCollection[0]; input.Name = Resources.ColumnsToXmlInputName; // Set Output properties IDTSOutput output = ComponentMetaData.OutputCollection[0]; output.Name = Resources.ColumnsToXmlOutputName; output.SynchronousInputID = input.ID; //Add Custom Properties for the component AddComponentCustomProperties(); }
private static async void cleanupACRStack(String stack) { SecretsUtils secretsUtils = new SecretsUtils(); await secretsUtils.GetSecrets(); PipelineUtils pipelineUtils = new PipelineUtils( new ContainerRegistryManagementClient(secretsUtils._credentials), new WebSiteManagementClient(secretsUtils._credentials), secretsUtils._subId); var client = new RestClient(String.Format("https://blimpacr.azurecr.io/v2/{0}/tags/list", stack)); var request = new RestRequest(Method.GET); request.AddHeader("Host", "blimpacr.azurecr.io"); request.AddHeader("Cache-Control", "no-cache"); String token = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes( String.Format("{0}:{1}", "blimpacr", secretsUtils._acrPassword))); request.AddHeader("Authorization", String.Format("Basic {0}", token)); // add logic for next page // or just run again IRestResponse response = client.Execute(request); var json = JsonConvert.DeserializeObject <dynamic>(response.Content.ToString()); var tags = json.tags; foreach (String t in tags) { if (t.Contains("2019")) { Console.WriteLine(String.Format("{0}:{1}", stack, t)); pipelineUtils.DeleteImage("blimpacr", stack, t, "blimpacr", secretsUtils._acrPassword); } } }
public static async Task Run([TimerTrigger("0 0 * * * 0")] TimerInfo myTimer, ILogger log) { // clean up blimp app every sunday secretsUtils = new SecretsUtils(); await secretsUtils.GetSecrets(); pipelineUtils = new PipelineUtils( new ContainerRegistryManagementClient(secretsUtils._credentials), new WebSiteManagementClient(secretsUtils._credentials), secretsUtils._subId ); resourceGroupName = "blimprg"; webClient = new WebSiteManagementClient(secretsUtils._credentials) { SubscriptionId = secretsUtils._subId }; DeleteApps("blimp-dotnetcore-plan"); DeleteApps("blimp-node-plan"); DeleteApps("blimp-php-plan"); DeleteApps("blimp-python-plan"); DeleteApps("blimp-ruby-plan"); DeleteImages("blimpacr", "dotnetcore"); DeleteImages("blimpacr", "node"); DeleteImages("blimpacr", "php"); DeleteImages("blimpacr", "python"); DeleteImages("blimpacr", "ruby"); }
/// <summary> /// Upgrade the channel to WebSocket. /// </summary> private void upgrade(ExtendedNettyFullAddress address) { /* * ========================================= Note ================================================= * Operations on the channel must happen in the thread associated with the channel. * Otherwise subtle bugs can appear. * For example the method WebSocketClientHandshaker.finishHandshake can return before * the method WebSocketClientHandshaker.handshake returns leaving the channel pipeline in a mess. * ================================================================================================ */ chnl.EventLoop.Execute(() => { /* * If the eventLoop is overloaded, when this task is executed the channel can be broken * (for example because the server has closed it). * So the first thing to do is to check if the channel is healthy. */ if (chnl.Active) { /* set cookies and extra headers */ string cookies = address.Cookies; IDictionary <string, string> extraHeaders = address.ExtraHeaders; DefaultHttpHeaders customHeaders = new DefaultHttpHeaders(); if (extraHeaders != null) { foreach (KeyValuePair <string, string> entry in extraHeaders) { customHeaders.Add(new AsciiString(entry.Key), entry.Value); } } if (!string.ReferenceEquals(cookies, null) && cookies.Length > 0) { customHeaders.Set(HttpHeaderNames.Cookie, cookies); } /* build url */ NettyFullAddress remoteAddress = address.Address; string scheme = remoteAddress.Secure ? "wss" : "ws"; string host = remoteAddress.Host; string url; int port = remoteAddress.Port; if (host.Equals("::1")) { url = scheme + "://localhost:" + port + "/lightstreamer"; } else { url = scheme + "://" + host + ":" + port + "/lightstreamer"; } Uri uri = LsUtils.uri(url); string subprotocol = Constants.TLCP_VERSION + ".lightstreamer.com"; /* build pipeline */ WebSocketHandshakeHandler wsHandshakeHandler = new WebSocketHandshakeHandler(uri, subprotocol, customHeaders, this); PipelineUtils.populateWSPipelineForHandshake(chnl, wsHandshakeHandler); /* WS handshake */ futureTask = wsHandshakeHandler.handshake(chnl); } else { futureTask = Task.Factory.StartNew(() => Thread.Sleep(2)); } }); return; }