This file contains hidden or 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 System.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
namespace AHttpClientTestWrapper | |
{ | |
public class HttpClientWrapper |
This file contains hidden or 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; | |
public class RandomPassword | |
{ | |
private static Random random = new Random(); | |
public static string Create(int length = 8, float charRatio = .8f) | |
{ | |
string password = ""; |
This file contains hidden or 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
[TestFixture] | |
public class TestStub: UmbracoTestBase | |
{ | |
[SetUp] | |
public void Setup() | |
{ | |
SetupFakeEnvironment(); | |
SetupRootContent(); | |
} |
This file contains hidden or 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 class ControlRenderer : IDisposable | |
{ | |
public static string RenderContents(Control control) | |
{ | |
using (var renderer = new ControlRenderer(control)) | |
{ | |
return renderer.Render(); | |
} | |
} |
This file contains hidden or 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
[TestFixture] | |
public class BusinessTests | |
{ | |
private IRepository<Entity> repo; | |
private ConcreteService service; | |
[SetUp] | |
public void SetUp() | |
{ | |
repo = MockRepository.GenerateStub<IRepository<Entity>>(); |
This file contains hidden or 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
<%@ Control Language="C#" AutoEventWireup="true" Inherits="This.Web.usercontrols.Administrative.UCommerceDataTypesCategory" %> | |
<asp:UpdateProgress ID="UpdateProgress1" | |
runat="server" | |
AssociatedUpdatePanelID="CategoryPanel"> | |
<ProgressTemplate> | |
<img src="/umbraco/images/throbber.gif" alt="Loading"/> | |
</ProgressTemplate> | |
</asp:UpdateProgress> | |
<asp:UpdatePanel runat="server" UpdateMode="Always" ID="CategoryPanel"> | |
<ContentTemplate> |
This file contains hidden or 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
$.fn.ellipsisUl = function() { | |
var sum = function(array, selector) { | |
var sum = 0; | |
array.each(function(i, e) { | |
sum += selector($(e)); | |
}); | |
return sum; | |
}, | |
paddingLeft = function(e) { | |
return Number(e.css("padding-left").replace("px", "")); |
This file contains hidden or 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
<%@ Page Language="C#" AutoEventWireup="true" %> | |
<% | |
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) | |
{ | |
Response.Write("<b>" + assembly.FullName + "</b><br/>\r\n"); | |
Response.Write("<ul>\r\n"); | |
foreach (var subAssembly in assembly.GetReferencedAssemblies()) | |
{ | |
Response.Write("<li>" + subAssembly.FullName + "</li>\r\n"); |
This file contains hidden or 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
protected static ServiceContext CreateServiceContext(string basePath, string connectionString, string providerName) | |
{ | |
var serviceContextManagerType = OptimisticType.GetType("Umbraco.Core.Standalone.ServiceContextManager, Umbraco.Core"); | |
if (serviceContextManagerType == null) | |
throw new Exception("Couldn't get Umbraco.Core.Standalone.ServiceContextManager type"); | |
var serviceContextManager = Activator.CreateInstance(serviceContextManagerType, | |
connectionString, | |
providerName, | |
basePath | |
); |
This file contains hidden or 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 | |
image.id, | |
replace(dataNvarchar, '/media', '/oldmedia') filename | |
FROM [umbracoNode] as image | |
inner join cmscontent on | |
cmscontent.nodeid = image.id | |
inner join cmscontenttype on | |
contenttype = cmscontenttype.nodeid | |
inner join cmsPropertyData on | |
cmsPropertyData.contentNodeId = image.id |
OlderNewer