Beispiel #1
0
 protected ContentData(string contentName)
 {
     if (string.IsNullOrEmpty(contentName))
         throw new ContentNameMissing();
     #if DEBUG
     //ncrunch: no coverage start
     if (!StackTraceExtensions.StartedFromNCrunchOrNunitConsole &&
         !contentName.StartsWith("<Generated"))
     {
         StackFrame[] frames = new StackTrace().GetFrames();
         if (frames != null && frames.All(f => f.GetMethod().DeclaringType != typeof(ContentLoader)))
             throw new MustBeCalledFromContentLoader();
     } //ncrunch: no coverage end
     #endif
     Name = contentName;
 }