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
| // paket outdated / update -> git commit | |
| open System | |
| open System.Diagnostics | |
| open System.IO | |
| open System.Threading | |
| let info format = | |
| printf "%s " (DateTime.Now.ToString("g")) | |
| printfn format | |
| let run filename arg = |
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
| # Build file with the latest packages in cache | |
| FROM microsoft/dotnet:2.2-sdk | |
| # fix Perl locale warnings :-( | |
| RUN echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && \ | |
| apt-get update && \ | |
| apt-get --no-install-recommends install -y locales | |
| WORKDIR /usr/mycode |
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
| var collectionSpecification = new DocumentCollection { Id = collectionId }; | |
| collectionSpecification.IndexingPolicy.IncludedPaths = new Collection<IncludedPath> | |
| { | |
| new IncludedPath | |
| { | |
| Path = "/*", | |
| Indexes = new Collection<Index> | |
| { | |
| new RangeIndex(DataType.Number), | |
| new RangeIndex(DataType.String), |
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
| var client = new Microsoft.Azure.Documents.Client.DocumentClient(new Uri(dbEndpoint),key); | |
| var urlDocument = UriFactory.CreateDocumentCollectionUri(dbName, collectionName); | |
| var query = "SELECT * FROM c"; | |
| var taskQuery = Task.Run( | |
| () => client.CreateDocumentQuery(urlDocument, query, | |
| new FeedOptions | |
| { | |
| MaxItemCount = 10, |
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 VersionedRoute : RouteFactoryAttribute | |
| { | |
| private readonly int _allowedVersion; | |
| public VersionedRoute(string template, int allowedVersion) : base(template) | |
| { | |
| _allowedVersion = allowedVersion; | |
| } | |
| public override IDictionary<string, object> Constraints |
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.Collections.ObjectModel; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Web.Http; | |
| using System.Web.Http.Controllers; | |
| using System.Web.Http.Description; | |
| using System.Web.Http.Routing; |
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
| //before postback | |
| if (typeof WebFormWebForm_DoPostBackWithOptions != 'undefined') { | |
| var originalWebFormWebFormDoPostBackWithOptions = WebFormWebForm_DoPostBackWithOptions; | |
| WebFormWebForm_DoPostBackWithOptions = function (options) { | |
| //add custom stuff here for execution before postback. | |
| originalWebFormWebFormDoPostBackWithOptions(options); | |
| }; | |
| } |