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; | |
namespace CSharpExtensions.Monads | |
{ | |
public abstract class Try | |
{ | |
public static Try Invoke(Action action) | |
{ | |
try | |
{ |
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
package utils | |
import scala.language.experimental.macros | |
import scala.reflect.macros.Context | |
object FileNameImpl { | |
def fileImpl(c: Context)(): c.Expr[String] = { | |
import c.universe._ | |
val Apply(_, List(Apply(_, List(Literal(Constant(fileName: String)))))) = c.prefix.tree |