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
<html> | |
<head> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.2.0/ZeroClipboard.min.js"></script> | |
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"> | |
<head> | |
<body> | |
<div class="container" style="margin-top:50px"> | |
<div class="input-group"> |
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
<script> | |
$(document).ready(function(){ | |
ZeroClipboard.config( { swfPath: "./ZeroClipboard.swf" } ); | |
var client = new ZeroClipboard($("#btnCopy")); | |
client.on("copy", function (event) { | |
var copiedValue = $('#txtTestInput').val(); | |
var clipboard = event.clipboardData; | |
clipboard.setData("text/plain", copiedValue); |
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
{ | |
"compilerOptions": { | |
"module": "commonjs", | |
"noImplicitAny": true, | |
"removeComments": true, | |
"preserveConstEnums": true, | |
"out": "../../built/local/tsc.js", | |
"sourceMap": true | |
}, | |
"files": [ |
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
public static Uri CreateUri(int port = 80) | |
{ | |
var host = Process.GetProcessesByName("fiddler").Any() ? "ipv4.fiddler" : "localhost"; | |
var portNumber = port == 80 ? string.Empty : ":" + port; | |
return new Uri("http://" + host + portNumber); | |
} |
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.Web.Http; | |
using WebActivatorEx; | |
using SwaggerTest; | |
using Swashbuckle.Application; | |
[assembly: PreApplicationStartMethod(typeof(SwaggerConfig), "Register")] | |
namespace SwaggerTest | |
{ | |
public class SwaggerConfig |
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
{ | |
swagger: "2.0", | |
info: { | |
version: "v1", | |
title: "SwaggerTest" | |
}, | |
host: "localhost:63171", | |
schemes: [ | |
"http" | |
], |
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 APIConsumerServices.Services.CustomService; | |
using FluentAssertions; | |
using NUnit.Framework; | |
namespace APIConsumerServices.Services.Tests | |
{ | |
[TestFixture] | |
public class CallServiceTest | |
{ | |
// CustomClient is the wrapper around the WSDL generated proxy class |
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
<div id="dvImportSegments" class="fileupload "> | |
<fieldset> | |
<legend>Upload your CSV File</legend> | |
<input type="file" name="File Upload" id="txtFileUpload" accept=".csv" /> | |
</fieldset> | |
</div> |
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
public bool UpdateUser(User user) | |
{ | |
var existingUser = this.GetUser(user.Username); | |
if (existingUser == null) | |
{ | |
return false; | |
} | |
existingUser.CopyValues(user); | |
UnitOfWork.UserRepository.Update(existingUser); | |
UnitOfWork.Save(); |
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
public virtual void Update(TEntity entityToUpdate) | |
{ | |
var entry = this.context.Entry(entityToUpdate); | |
this.databaseSet.Attach(entityToUpdate); | |
entry.State = EntityState.Modified; | |
} |
OlderNewer