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
/** | |
* Wraps LockService with retry logic and fixes the "Too many LockService operations" Error. https://issuetracker.google.com/issues/112384851 | |
*/ | |
class Lock { | |
constructor(lock) { | |
this._lock = lock; | |
} | |
waitLock(timeoutInMillis) { | |
return Lock._retry(() => this._lock.waitLock(timeoutInMillis)); |
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
FROM microsoft/dotnet:2.1.6-aspnetcore-runtime-stretch-slim | |
# Install debugging tools | |
## Install GDB (to create core dumps) and process tools | |
RUN apt-get update && apt-get -y install \ | |
gdb \ | |
procps | |
## Install LLDB debugger | |
RUN apt-get -y install lldb-4.0 |
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
// persissted data | |
public class Company{ | |
public int Id {get; set} | |
public string Name {get; set} | |
} | |
public class ProductContext : DbContext | |
{ | |
public DbSet<Company> Companies { get; set; } | |
} |
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.Linq; | |
using System.Net; | |
using System.Net.NetworkInformation; | |
public bool TcpPortIsAvailableForListening(int port) | |
{ | |
IPGlobalProperties ipGlobalProperties = IPGlobalProperties.GetIPGlobalProperties(); | |
IPEndPoint[] tcpEndPointArray = ipGlobalProperties.GetActiveTcpListeners(); | |
var isUnavailable = tcpEndPointArray.Any(endPoint => endPoint.Port == port); |