Featured DotNet Devotion
See all devotions →Exodus 20v3: No other gods before/besides me.
Exodus 20:3
Wed 15 July
Read devotion →public abstract class WorshipTarget { }
public interface IClaimsToBeGod { }
public partial sealed class God : WorshipTarget, IClaimsToBeGod
{
//not saying there is a new God here.
public static God Instance { get; } = new();
private God() { }
}
public class Idol : WorshipTarget, IClaimsToBeGod { }
public partial class FirstCommandment: MoralCommandment, IMoralCommandment
{
bool IsRightWorship(WorshipTarget target)
{
if (!ReferenceEquals(target, God.Instance))
throw new InvalidOperationException(
"You shall have no other gods before/besides Me."
);
return true;
}
bool IsRightWorship(WorshipTarget[] targets)
{
if (targets.Length != 1)
throw new InvalidOperationException(
"Worship cannot be divided."); //Matthew 6:24
return IsRightWorship(targets[0]);
}
}


