partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task <global::System.IO.Stream> response, ref global::System.Threading.Tasks.Task <bool> returnNow)
        {
            global::System.Collections.ObjectModel.Collection <global::System.String> paths;
            try {
                paths = this.SessionState.Path.GetResolvedProviderPathFromPSPath(OutFile, out var provider);
                if (provider.Name != "FileSystem" || paths.Count == 0)
                {
                    ThrowTerminatingError(new System.Management.Automation.ErrorRecord(new global::System.Exception("Invalid output path."), string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, OutFile));
                }
                if (paths.Count > 1)
                {
                    ThrowTerminatingError(new System.Management.Automation.ErrorRecord(new global::System.Exception("Multiple output paths not allowed."), string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, OutFile));
                }
            } catch (global::System.Management.Automation.ItemNotFoundException) {
                paths = new global::System.Collections.ObjectModel.Collection <global::System.String>();
                paths.Add(OutFile);
            }
            var path = global::System.IO.Path.GetFullPath(paths[0]);

            using (var stream = response.GetAwaiter().GetResult())
            {
                using (var fileStream = global::System.IO.File.OpenWrite(path))
                {
                    stream.CopyTo(fileStream);
                }
                if (!path.Equals(paths[0]))
                {
                    WriteObject($"OutFile: {path}");
                }
            }
            if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru"))
            {
                WriteObject(true);
            }
            returnNow = global::System.Threading.Tasks.Task.FromResult <bool>(true);
        }
 partial void OnBaseSetChanging(global::System.Collections.ObjectModel.Collection <global::Namespace.Foo.TestType> value);
Ejemplo n.º 3
0
 partial void OnOrdersChanging(global::System.Collections.ObjectModel.Collection <global::Microsoft.Test.E2E.AspNet.OData.Batch.Tests.UnbufferedBatchProxy.UnbufferedBatchOrder> value);
Ejemplo n.º 4
0
 public void AddBindingParameters(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, global::System.Collections.ObjectModel.Collection <ServiceEndpoint> endpoints, BindingParameterCollection bindingParameters)
 {
     _state.CurrentStage += ", IServiceBehavior.AddBindingParameters";
     bindingParameters.Add(this);
 }
 partial void OnTripsChanging(global::System.Collections.ObjectModel.Collection <global::Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip> value);
Ejemplo n.º 6
0
 partial void OnAlumnoAsignaturasChanging(global::System.Collections.ObjectModel.Collection <global::AlumnosContext.entities.AlumnoAsignatura> value);
Ejemplo n.º 7
0
 partial void OnAvailableRegionsChanging(global::System.Collections.ObjectModel.Collection <Location.PoliticalRegion> value);
Ejemplo n.º 8
0
 partial void OnDetailsChanging(global::System.Collections.ObjectModel.Collection <Billing.OrderLine> value);
Ejemplo n.º 9
0
 partial void OnPurchasesChanging(global::System.Collections.ObjectModel.Collection <AliasedNamespace.Order> value);
Ejemplo n.º 10
0
 partial void OndupPropertyNameChanging(global::System.Collections.ObjectModel.Collection <global::DupNames.DupWithTypeName1> value);
Ejemplo n.º 11
0
 partial void OnProductsChanging(global::System.Collections.ObjectModel.Collection <global::UdemyAPIOData.API.Models.Product> value);
 partial void OnAlumnosAsignaturaChanging(global::System.Collections.ObjectModel.Collection <global::AlumnosService.entities.AlumnoAsignatura> value);
Ejemplo n.º 13
0
 partial void OnFoundersChanging(global::System.Collections.ObjectModel.Collection <global::StartupService.Models.Person> value);
Ejemplo n.º 14
0
 partial void OnOrdersChanging(global::System.Collections.ObjectModel.Collection <global::WebStack.QA.Test.OData.Batch.Tests.DefaultBatchProxy.DefaultBatchOrder> value);
 partial void OnProductItemsChanging(global::System.Collections.ObjectModel.Collection <global::Namespace1.ProductItem> value);