Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Criação da avaliação minuto seguros #73

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.vs/AvaliacaoMinutoSeguros/v15/Server/sqlite3/db.lock
Binary file added .vs/AvaliacaoMinutoSeguros/v15/.suo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1,033 changes: 1,033 additions & 0 deletions .vs/config/applicationhost.config

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions AvaliacaoMinutoSeguros.App/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<appSettings>
<add key="Uri" value="http://www.minutoseguros.com.br/blog/feed/" />
</appSettings>
</configuration>
75 changes: 75 additions & 0 deletions AvaliacaoMinutoSeguros.App/AvaliacaoMinutoSeguros.App.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F9250B32-FA0B-48B4-B012-279E49BB7147}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>AvaliacaoMinutoSeguros.App</RootNamespace>
<AssemblyName>AvaliacaoMinutoSeguros.App</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoMapper, Version=9.0.0.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\packages\AutoMapper.9.0.0\lib\net461\AutoMapper.dll</HintPath>
</Reference>
<Reference Include="SimpleInjector, Version=4.9.1.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
<HintPath>..\packages\SimpleInjector.4.9.1\lib\net45\SimpleInjector.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AvaliacaoMinutoSeguros.Business\AvaliacaoMinutoSeguros.Business.csproj">
<Project>{DB6A7603-577A-40ED-9349-4D1DDEEF2731}</Project>
<Name>AvaliacaoMinutoSeguros.Business</Name>
</ProjectReference>
<ProjectReference Include="..\AvaliacaoMinutoSeguros.Domain\AvaliacaoMinutoSeguros.Domain.csproj">
<Project>{9a75e813-824f-4e5e-be63-7a8007961367}</Project>
<Name>AvaliacaoMinutoSeguros.Domain</Name>
</ProjectReference>
<ProjectReference Include="..\AvaliacaoMinutoSeguros.Infra.IoC\AvaliacaoMinutoSeguros.Infra.IoC.csproj">
<Project>{545b4adb-958f-48de-8afe-72b7e53a2371}</Project>
<Name>AvaliacaoMinutoSeguros.Infra.IoC</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
58 changes: 58 additions & 0 deletions AvaliacaoMinutoSeguros.App/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using AutoMapper;
using AvaliacaoMinutoSeguros.Business.AutoMapper;
using AvaliacaoMinutoSeguros.Domain.Interfaces.Servicos;
using AvaliacaoMinutoSeguros.Infra.IoC;
using System;
using System.Configuration;

namespace AvaliacaoMinutoSeguros.App
{
/// <summary>
/// Criado por: Marconcilio Souza
/// Linkedin:
/// </summary>
class Program
{
static void Main(string[] args)
{
// registra o contaner de IoC
var iocInjector = new SimpleInjectorContainer();
//registra o auto map
var mapperConfiguration = AutoMapperConfig.RegisterMappings();
IMapper mapper = mapperConfiguration.CreateMapper();

string uri = ConfigurationManager.AppSettings["Uri"];

var servicoRssFeed = iocInjector.container.GetInstance<IServicoRssFeed>();

var rssFeedViewModel = servicoRssFeed.ProcessarRssFeed(uri, mapper);

System.Console.WriteLine($"Dados do blog: { rssFeedViewModel.Title }");
System.Console.WriteLine($"Ultima alteração: { rssFeedViewModel.LastBuildDate }");
Console.WriteLine();

foreach (var item in rssFeedViewModel.Items)
{
System.Console.WriteLine($"Título do blog: { item.Title }");
System.Console.WriteLine($"Criado por: { item.Creator }");
System.Console.WriteLine($"Publicado em: { item.PubDate }");
Console.WriteLine();

Console.WriteLine("As 10 dez principais palavras abordadas nesses tópicos são:");
var index = 1;
foreach (var palavra in item.Palavras)
{
Console.WriteLine($"{ index }ª) { palavra.Palavra.ToUpper() }, o número de vezes que ela apareceu foi: { palavra.TotalVezesUsuada }!");
index++;
}

Console.WriteLine($"Total de palavras usuadas no blog { item.TotalPalavrasBlog } palavras");

Console.WriteLine();
}


Console.ReadKey();
}
}
}
36 changes: 36 additions & 0 deletions AvaliacaoMinutoSeguros.App/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AvaliacaoMinutoSeguros.App")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AvaliacaoMinutoSeguros.App")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f9250b32-fa0b-48b4-b012-279e49bb7147")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Binary file not shown.
Binary file not shown.
Loading