public void SetInsetAndSizeFromParentEdge(Edge edge, float inset, float size)
{
int num = ((edge != Edge.Top) && (edge != Edge.Bottom)) ? 0 : 1;
bool flag = (edge == Edge.Top) || (edge == Edge.Right);
float num2 = !flag ? ((float) 0) : ((float) 1);
Vector2 anchorMin = this.anchorMin;
anchorMin[num] = num2;
this.anchorMin = anchorMin;
anchorMin = this.anchorMax;
anchorMin[num] = num2;
this.anchorMax = anchorMin;
Vector2 sizeDelta = this.sizeDelta;
sizeDelta[num] = size;
this.sizeDelta = sizeDelta;
Vector2 anchoredPosition = this.anchoredPosition;
anchoredPosition[num] = !flag ? (inset + (size * this.pivot[num])) : (-inset - (size * (1f - this.pivot[num])));
this.anchoredPosition = anchoredPosition;
}