This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
using Newtonsoft.Json.Serialization; | |
namespace SelfService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"commands": { | |
"web": "SelfService" | |
}, | |
"version": "1.0.0-*", | |
"compilationOptions": { | |
"emitEntryPoint": true, | |
"preserveCompilationContext": true | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Customer Error Monitor(Sony email)", | |
"services": { | |
"query": { | |
"idQueue": [ | |
1, | |
2, | |
3, | |
4 | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from [file] with (nolock) where id in (select [file_id] from [attachment] with (nolock) where id in ( | |
'b3c701da-3fc4-460f-ac53-a1930101a870', | |
'4721031b-c9b8-45b7-949d-a1fd017ad51f', | |
'75cfd34e-f930-437b-acff-a1a300e19663', | |
'73e904c3-84c0-4ab8-a60b-a218017aee8f', | |
'73c565a0-b2a8-4423-9ce7-a270014fa596', | |
'f85fd541-7edc-4d85-bd4a-a270014fa596', | |
'88df6322-c622-4b2e-a1a5-a270016a81ce', | |
'194ed7c4-9328-4298-bfef-a27d0180cc4c', | |
'f1cefb83-7188-4cf6-9a76-a2b40187e486', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<add key="FileExtractSettings.BlackListExtensions" value="7z,apk,ARTask,asc,avi,bmp,dat,docm,eml,emz,exe,gdoc,gif,gsheet,ico,ics,jpeg,jfif,jpg,jsf,mht,msg,mov,mso,mp3,mp4,odt,oft,p7s,png,ppsx,quiz,rar,raw,rtf,STX,svg,swf,td,tif,tiff,TTO__AppData__Local__Temp__msohtmlclip1_,TXT_63020131515,wav,wmv,xlr,xlsm,xml,xps,zip" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Distinct File extensions | |
SELECT DISTINCT Reverse(Substring(Reverse(originalfilename), 1, | |
Charindex('.', Reverse(originalfilename) | |
) - 1)) AS FileExt | |
FROM [file] WITH (nolock) | |
WHERE Charindex('.', originalfilename) != 0 | |
AND Reverse(Substring(Reverse(originalfilename), 1, | |
Charindex('.', Reverse(originalfilename) | |
) - 1)) NOT IN ( 'csv', 'pdf', 'htm', 'html', | |
'xls', 'xlsx', 'ppt', 'pptx', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (ExtensionProperties.HasExtensionFor(typeof(T))) | |
{ | |
var componentType = typeof(ExtensionComponent<>).MakeGenericType(ExtensionProperties.ExtensionFor(typeof(T))); | |
if (componentType != null) | |
{ | |
var component = Activator.CreateInstance(componentType) as IComponentMappingProvider; | |
(Components as IList<IComponentMappingProvider>).Add(component); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void TestDomainFilterBlacklistRuleWorks() | |
{ | |
IRepository repository = _mocks.Stub<IRepository>(); | |
repository.Stub(x => x.Query(new DomainFilterBlacklistRegEx("foo"))).Return( | |
new List<AdNetworkCacheDomainBlacklist> {null}.AsQueryable()); | |
IRequestInfo requestInfo = _mocks.Stub<IRequestInfo>(); | |
requestInfo.Stub(x => x.UserIpAddress).Return("foo"); | |
ITidalTvAdNetworkResponse response = new TidalTvAdNetworkResponse(); | |
IAdDecisioningRule rule = new DomainFilterBlacklistRule(repository); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void TestDomainFilterBlacklistRuleWorks() | |
{ | |
IRepository repository = _mocks.Stub<IRepository>(); | |
repository.Stub(x => x.Query(new DomainFilterBlacklistRegEx("foo"))).Return( | |
new List<AdNetworkCacheDomainBlacklist> {null}.AsQueryable()); | |
IRequestInfo requestInfo = _mocks.Stub<IRequestInfo>(); | |
requestInfo.Stub(x => x.UserIpAddress).Return("foo"); | |
ITidalTvAdNetworkResponse response = new TidalTvAdNetworkResponse(); | |
IAdDecisioningRule rule = new DomainFilterBlacklistRule(repository); |