static void Log(YGConfig config, YGNode node, YGLogLevel level, object context, string message) { YGConfig logConfig = config ?? YGGlobal.YGConfigGetDefault(); logConfig.Log(logConfig, node, level, context, message); if (level == YGLogLevel.Fatal) { Environment.FailFast("Fatal exception"); } }
protected bool Equals(YGStyle other) { bool areNonFloatValuesEqual = direction == other.direction && flexDirection == other.flexDirection && justifyContent == other.justifyContent && alignContent == other.alignContent && alignItems == other.alignItems && alignSelf == other.alignSelf && positionType == other.positionType && flexWrap == other.flexWrap && overflow == other.overflow && display == other.display && YGGlobal.YGValueEqual(flexBasis, other.flexBasis) && margin == other.margin && position == other.position && padding == other.padding && border == other.border && dimensions == other.dimensions && minDimensions == other.minDimensions && maxDimensions == other.maxDimensions; areNonFloatValuesEqual = areNonFloatValuesEqual && flex.IsUndefined() == other.flex.IsUndefined(); if (areNonFloatValuesEqual && !flex.IsUndefined() && !other.flex.IsUndefined()) { areNonFloatValuesEqual = areNonFloatValuesEqual && flex == other.flex; } areNonFloatValuesEqual = areNonFloatValuesEqual && flexGrow.IsUndefined() == other.flexGrow.IsUndefined(); if (areNonFloatValuesEqual && !flexGrow.IsUndefined()) { areNonFloatValuesEqual = areNonFloatValuesEqual && flexGrow == other.flexGrow; } areNonFloatValuesEqual = areNonFloatValuesEqual && flexShrink.IsUndefined() == other.flexShrink.IsUndefined(); if (areNonFloatValuesEqual && !other.flexShrink.IsUndefined()) { areNonFloatValuesEqual = areNonFloatValuesEqual && flexShrink == other.flexShrink; } if (!(aspectRatio.IsUndefined() && other.aspectRatio.IsUndefined())) { areNonFloatValuesEqual = areNonFloatValuesEqual && aspectRatio == other.aspectRatio; } return(areNonFloatValuesEqual); }