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
alert('ja') |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> |
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
<link rel="import" href="../core-ajax/core-ajax.html"> | |
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> |
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
internal static class ReflectiveEnumerator | |
{ | |
public static IEnumerable<Type> GetEnumerableOfType<T>() where T : class | |
{ | |
var objects = Assembly | |
.GetAssembly(typeof (T)) | |
.GetTypes() | |
.Where(myType => myType.IsClass && !myType.IsAbstract && myType.IsSubclassOf(typeof (T))) | |
.ToList(); | |
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
internal class TemporaryFile : IDisposable | |
{ | |
private readonly FileInfo _fileInfo; | |
private bool _disposed; | |
public TemporaryFile(string extension = "tmp") | |
{ | |
_fileInfo = CreateFilename(extension); | |
} |
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
internal class TemporaryDirectory : IDisposable | |
{ | |
private readonly DirectoryInfo _directoryInfo; | |
private bool _disposed; | |
public TemporaryDirectory() | |
{ | |
_directoryInfo = new DirectoryInfo(Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"))); | |
_directoryInfo.Create(); | |
} |
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 StreamFormatter : MediaTypeFormatter | |
{ | |
private readonly MediaTypeHeaderValue _mediaType; | |
/// <summary> | |
/// Default constructor | |
/// </summary> | |
/// <param name="mediaType"></param> | |
public StreamFormatter(MediaTypeHeaderValue mediaType) | |
{ |
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
internal static class StringExtensions | |
{ | |
public static string ReplaceCaseInsensitive(this string source, object replacements) | |
{ | |
replacements | |
.GetType() | |
.GetProperties() | |
.Select(p => new {p.Name, Value = p.GetValue(replacements) as string ?? ""}) | |
.ToList() | |
.ForEach(p => { source = ReplaceCaseInsensitive(source, string.Format("{{{0}}}", p.Name), p.Value); }); |
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
internal class ShortNameSerializationBinder<TBase> : DefaultSerializationBinder where TBase : class | |
{ | |
private static Dictionary<string, Type> types; | |
public ShortNameSerializationBinder() | |
{ | |
types = ReflectiveEnumerator.GetEnumerableOfType<TBase>().ToDictionary(i => i.Name, i => i); | |
} | |
public override void BindToName(Type serializedType, out string assemblyName, out string typeName) |
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.IO; | |
namespace Streams | |
{ | |
/// <summary> | |
/// Just a basis class that makes it easy to overwrite what you want | |
/// </summary> | |
public abstract class StreamDecoratorBase : Stream | |
{ | |
/// <summary> |
OlderNewer