//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public static T GetAndVerifyElementAttribute <T>(Type pType) where T : WeaverElementAttribute { T att = WeaverUtil.GetElementAttribute <T>(pType); if (att == null) { throw new WeaverException("Type '" + pType.Name + "' must have a " + typeof(T).Name + "."); } return(att); }
/*--------------------------------------------------------------------------------------------*/ private void BuildType <T>(Type pType, Action <Type, T> pFinish) where T : WeaverElementAttribute { T att = WeaverUtil.GetElementAttribute <T>(pType); if (att == null) { throw new WeaverException("Type '" + pType.Name + "' must have a " + typeof(T).Name + "."); } pFinish(pType, att); }
public void GetElementAttribute(Type pType, bool pFound) { var result = WeaverUtil.GetElementAttribute <WeaverVertexAttribute>(pType); if (pFound) { Assert.NotNull(result, "Result should be filled."); } else { Assert.Null(result, "Result should be null."); } }