/// <inheritdoc /> public IInformationOutput Parse(string[] rawOutput) { var hashers = new List <string>(); var codecs = new List <string>(); var formats = new List <string>(); var libs = new List <string>(); var information = new InformationOutput { Hashers = hashers, Codecs = codecs, Formats = formats, Libs = libs, }; var firstLine = true; var current = new List <string>(); foreach (var line in rawOutput) { if (string.IsNullOrWhiteSpace(line)) { continue; } if (firstLine) { firstLine = false; information.Information = line; continue; } switch (line) { case "Hashers:": current = hashers; break; case "Codecs:": current = codecs; break; case "Formats:": current = formats; break; case "Libs:": current = libs; break; default: current.Add(line); break; } } return(information); }
public static InformationOutput GetTarget_CreatedInformationOutput(IContainerOwner owner, string outputDescription, string destinationUrl, string destinationContentName, string localContentUrl, string authenticatedDeviceId) { InformationOutput informationOutput = new InformationOutput(); informationOutput.SetLocationAsOwnerContent(owner, informationOutput.ID); informationOutput.OutputDescription = outputDescription; informationOutput.DestinationURL = destinationUrl; informationOutput.DestinationContentName = destinationContentName; informationOutput.LocalContentURL = localContentUrl; informationOutput.AuthenticatedDeviceID = authenticatedDeviceId; return informationOutput; }
/*Создать консольное приложение, позволяющее пользователю добавлять и просматривать постранично страны и города к ним. * * Страна состоит из названия и списка городов. * Город состоит из названия, ссылки на страну и логического значения, которое показывает, является ли город столицей. * * Постраничный вывод осуществляется по 3 позиции. * * Время сдачи - 22:00. Те, кто сдал в 22:01 и позже считаются провалившими экзамен. * Сдача через гит. Ссылку на гит на почту до 22:00. * * Максимальные баллы, без учёта ошибок: * Подключённый уровень - 12 баллов * Dapper - 10 баллов * EF Core - 8 баллов.*/ static void Main(string[] args) { /*var collectionCountry = new List<Country>() { * new Country { Name = "Казахстан" }, * new Country{Name = "Россия"}, * new Country{Name = "Сша"} * }; * var collectionTown = new List<Town>() * { * new Town{Name = "Астана", Capital = true, Country = collectionCountry[0]}, * new Town {Name = "Алматы", Capital = false,Country = collectionCountry[0] }, * new Town {Name = "Павлодар", Capital = false,Country = collectionCountry[0] }, * new Town {Name = "Москва", Capital = true,Country = collectionCountry[1] }, * new Town {Name = "Питер", Capital = false,Country = collectionCountry[1] }, * new Town {Name = "Омск", Capital = false,Country = collectionCountry[1] }, * new Town {Name = "Кемерево", Capital = false,Country = collectionCountry[1] }, * new Town {Name = "Нью-йорк", Capital = false,Country = collectionCountry[2] }, * new Town {Name = "Вашингтон", Capital = true,Country = collectionCountry[2] }, * new Town {Name = "Маями", Capital = true,Country = collectionCountry[2] }, * * }; * using (var context = new ApplicationContext()) * { * for (int i = 0; i < collectionTown.Count; i++) * { * context.Add(collectionTown[i]); * } * context.SaveChanges(); * }*/ while (true) { InformationOutput informationOutput = new InformationOutput(); informationOutput.PageOutput(); Console.ReadLine(); Console.Clear(); } }
public static void ExecuteMethod_SetInputValidAndActiveValue(bool isValidAndActive, InformationOutput informationOutput) { informationOutput.IsValidatedAndActive = isValidAndActive; }
public static void ExecuteMethod_StoreObject(InformationOutput informationOutput) { informationOutput.StoreInformation(); }
public static CreateInformationOutputReturnValue Get_ReturnValue(InformationOutput createdInformationOutput) { return new CreateInformationOutputReturnValue() {InformationOutput = createdInformationOutput}; }
public static void ExecuteMethod_DeleteInformationOutput(InformationOutput informationOutput) { informationOutput.DeleteInformationObject(); }