private bool FixDynamicFlags(IDynamicTypeContainer dynamicTypeContainer) { if (!dynamicTypeContainer.get_IsDynamic()) { V_1 = 0; this.CountTypeTokens(dynamicTypeContainer.get_DynamicContainingType(), ref V_1); if (V_1 != this.dynamicPositioningFlags.get_Count()) { return(false); } dynamicTypeContainer.set_DynamicPositioningFlags(new Boolean[V_1]); } else { if ((int)dynamicTypeContainer.get_DynamicPositioningFlags().Length != this.dynamicPositioningFlags.get_Count()) { throw new Exception("Inconsistent count of positioning flags."); } } V_0 = this.dynamicPositioningFlags.get_First(); V_2 = 0; while (V_2 < (int)dynamicTypeContainer.get_DynamicPositioningFlags().Length) { stackVariable26 = &dynamicTypeContainer.get_DynamicPositioningFlags()[V_2]; stackVariable26 = stackVariable26 | V_0.get_Value(); V_0 = V_0.get_Next(); V_2 = V_2 + 1; } return(true); }
private bool FixDynamicFlags(IDynamicTypeContainer dynamicTypeContainer) { if (dynamicTypeContainer.IsDynamic) { if (dynamicTypeContainer.DynamicPositioningFlags.Length != this.dynamicPositioningFlags.Count) { throw new Exception(InconsistentCountOfFlags); } } else { int count = 0; CountTypeTokens(dynamicTypeContainer.DynamicContainingType, ref count); if (count != this.dynamicPositioningFlags.Count) { //throw new Exception(InconsistentCountOfFlags); return(false); } dynamicTypeContainer.DynamicPositioningFlags = new bool[count]; } LinkedListNode <bool> currentNode = this.dynamicPositioningFlags.First; for (int i = 0; i < dynamicTypeContainer.DynamicPositioningFlags.Length; i++) { dynamicTypeContainer.DynamicPositioningFlags[i] |= currentNode.Value; currentNode = currentNode.Next; } return(true); }
private bool FixDynamicFlags(IDynamicTypeContainer dynamicTypeContainer) { if (dynamicTypeContainer.IsDynamic) { if (dynamicTypeContainer.DynamicPositioningFlags.Length != this.dynamicPositioningFlags.Count) { throw new Exception(InconsistentCountOfFlags); } } else { int count = 0; CountTypeTokens(dynamicTypeContainer.DynamicContainingType, ref count); if (count != this.dynamicPositioningFlags.Count) { //throw new Exception(InconsistentCountOfFlags); return false; } dynamicTypeContainer.DynamicPositioningFlags = new bool[count]; } LinkedListNode<bool> currentNode = this.dynamicPositioningFlags.First; for (int i = 0; i < dynamicTypeContainer.DynamicPositioningFlags.Length; i++) { dynamicTypeContainer.DynamicPositioningFlags[i] |= currentNode.Value; currentNode = currentNode.Next; } return true; }