internal override TargetObject GetElement(TargetMemoryAccess target, int[] indices) { int offset = GetArrayOffset(target, indices); TargetBlob blob; TargetLocation dynamic_location; try { blob = Location.ReadMemory(target, Type.Size); GetDynamicSize(target, blob, Location, out dynamic_location); } catch (TargetException ex) { throw new LocationInvalidException(ex); } TargetLocation new_loc = dynamic_location.GetLocationAtOffset(offset); if (Type.ElementType.IsByRef) { new_loc = new_loc.GetDereferencedLocation(); } if (new_loc.HasAddress && new_loc.GetAddress(target).IsNull) { return(new TargetNullObject(Type.ElementType)); } return(Type.ElementType.GetObject(target, new_loc)); }
internal TargetObject GetInstanceField(TargetMemoryAccess target, TargetStructObject instance, TargetFieldInfo field) { GetFields(target); int offset = field_offsets [field.Position]; TargetType type = field_types [field.Position]; if (!Type.IsByRef) { offset -= 2 * target.TargetMemoryInfo.TargetAddressSize; } TargetLocation field_loc = instance.Location.GetLocationAtOffset(offset); TargetAddress orig_addr = field_loc.GetAddress(target); if (type.IsByRef) { field_loc = field_loc.GetDereferencedLocation(); } TargetAddress addr = field_loc.GetAddress(target); if (field_loc.HasAddress && field_loc.GetAddress(target).IsNull) { return(new TargetNullObject(type)); } return(type.GetObject(target, field_loc)); }
public void GenerateMission(int lastLocation) { if (UIManager.Instance) { int rand = Random.Range(0, m_Locations.Count); if (rand == lastLocation) { rand = (rand + 1) % m_Locations.Count; } TargetLocation = m_Locations[rand]; TargetLocation.SetTarget(true); TargetLocation.Loop.Play(); MissionTimer = m_MissionDuration; UIManager.Instance.ShowLocationMarker(TargetLocation); UIManager.Instance.UpdateMissionCounter(MissionCounter); if (MissionCounter > 0) { UIManager.Instance.Messages.ShowRandomMessage(); GameManager.Instance.Player.SMS(); } OnMissionStarted.Invoke(TargetLocation); } }
public MonoClassObject(MonoClassType type, MonoClassInfo info, TargetLocation location) : base(type, location) { this.type = type; this.info = info; }
internal override void SetObject(TargetMemoryAccess target, TargetLocation location, TargetObject obj) { TargetLocation flag_loc = location.GetLocationAtOffset(ElementType.Size); byte[] buffer = new byte [1]; if (obj is TargetNullObject) { buffer [0] = 0; flag_loc.WriteBuffer(target, buffer); return; } MonoNullableObject nobj = obj as MonoNullableObject; if (nobj != null) { if (!nobj.HasValue(target)) { buffer [0] = 0; flag_loc.WriteBuffer(target, buffer); return; } else { obj = nobj.GetValue(target); } } buffer [0] = 1; flag_loc.WriteBuffer(target, buffer); ElementType.SetObject(target, location, obj); }
internal TargetClassObject GetCurrentObject(TargetMemoryAccess target, TargetLocation location) { // location.Address resolves to the address of the MonoObject, // dereferencing it once gives us the vtable, dereferencing it // twice the class. TargetAddress address; address = target.ReadAddress(location.GetAddress(target)); address = target.ReadAddress(address); TargetType current = File.MonoLanguage.ReadMonoClass(target, address); if (current == null) { return(null); } if (IsByRef && !current.IsByRef) // Unbox { location = location.GetLocationAtOffset( 2 * target.TargetMemoryInfo.TargetAddressSize); } return((TargetClassObject)current.GetObject(target, location)); }
internal override void SetObject(TargetMemoryAccess target, TargetLocation location, TargetObject obj) { TargetLocation flag_loc = location.GetLocationAtOffset (ElementType.Size); byte[] buffer = new byte [1]; if (obj is TargetNullObject) { buffer [0] = 0; flag_loc.WriteBuffer (target, buffer); return; } MonoNullableObject nobj = obj as MonoNullableObject; if (nobj != null) { if (!nobj.HasValue (target)) { buffer [0] = 0; flag_loc.WriteBuffer (target, buffer); return; } else { obj = nobj.GetValue (target); } } buffer [0] = 1; flag_loc.WriteBuffer (target, buffer); ElementType.SetObject (target, location, obj); }
public async Task Migrate(IProjectSettings project, TargetLocation location) { project.EnsureAllDirectoriesExist(); Dictionary <string, string> fromDisk; switch (location) { case TargetLocation.Directory: fromDisk = await ReadFromDirectory(project); break; case TargetLocation.ZipArchive: fromDisk = await ReadFromZip(project); break; default: throw new ArgumentOutOfRangeException(nameof(location), location, null); } var deserialized = await _stocksBulkDeserializer.DeserializeAsync(fromDisk); await _databaseManagementService.EnsureDbExists(project); _companyBulkInserter.BulkInsert(project.ConnectionString, nameof(Company), deserialized); }
//public TargetLocation GetObjectLocation(EZ_B.AVM.TrainedObjectsContainer.TrainedObject trainedObject) //{ // TargetLocation targetLocation = TargetLocation.Unknown; // camera.CameraAVMObjectDetection.AddObject(trainedObject); // var objectLocation = camera.CameraAVMObjectDetection.GetDetectedObjects(true, true); // targetLocation = GetTargetLocationFromObjectLocation(objectLocation); //} private TargetLocation GetTargetLocationFromObjectLocation(ObjectLocation objectLocation) { TargetLocation targetLocation = TargetLocation.Unknown; if (objectLocation.HorizontalLocation == ObjectLocation.HorizontalLocationEnum.Left && objectLocation.VerticalLocation == ObjectLocation.VerticalLocationEnum.Bottom) { targetLocation = TargetLocation.BottomLeft; } if (objectLocation.HorizontalLocation == ObjectLocation.HorizontalLocationEnum.Middle && objectLocation.VerticalLocation == ObjectLocation.VerticalLocationEnum.Bottom) { targetLocation = TargetLocation.BottomCenter; } if (objectLocation.HorizontalLocation == ObjectLocation.HorizontalLocationEnum.Right && objectLocation.VerticalLocation == ObjectLocation.VerticalLocationEnum.Bottom) { targetLocation = TargetLocation.BottomRight; } if (objectLocation.HorizontalLocation == ObjectLocation.HorizontalLocationEnum.Left && objectLocation.VerticalLocation == ObjectLocation.VerticalLocationEnum.Middle) { targetLocation = TargetLocation.CenterLeft; } if (objectLocation.HorizontalLocation == ObjectLocation.HorizontalLocationEnum.Middle && objectLocation.VerticalLocation == ObjectLocation.VerticalLocationEnum.Middle) { targetLocation = TargetLocation.CenterCenter; } if (objectLocation.HorizontalLocation == ObjectLocation.HorizontalLocationEnum.Right && objectLocation.VerticalLocation == ObjectLocation.VerticalLocationEnum.Middle) { targetLocation = TargetLocation.CenterRight; } if (objectLocation.HorizontalLocation == ObjectLocation.HorizontalLocationEnum.Left && objectLocation.VerticalLocation == ObjectLocation.VerticalLocationEnum.Top) { targetLocation = TargetLocation.TopLeft; } if (objectLocation.HorizontalLocation == ObjectLocation.HorizontalLocationEnum.Middle && objectLocation.VerticalLocation == ObjectLocation.VerticalLocationEnum.Top) { targetLocation = TargetLocation.TopCenter; } if (objectLocation.HorizontalLocation == ObjectLocation.HorizontalLocationEnum.Right && objectLocation.VerticalLocation == ObjectLocation.VerticalLocationEnum.Top) { targetLocation = TargetLocation.TopRight; } return(targetLocation); }
protected string ReadString(TargetMemoryAccess target, TargetLocation start) { if (start.HasAddress && start.GetAddress(target).IsNull) { return("null"); } StringBuilder sb = new StringBuilder(); bool done = false; int offset = 0; while (!done && (offset < MaximumDynamicSize)) { TargetLocation location = start.GetLocationAtOffset(offset); byte[] buffer = location.ReadBuffer(target, ChunkSize); int pos = 0; int size = buffer.Length; char[] char_buffer = new char [size * 3]; for (int i = 0; i < size; i++) { if (buffer [i] == 0) { done = true; break; } char ch = (char)buffer [i]; if (Char.IsLetterOrDigit(ch) || Char.IsPunctuation(ch) || Char.IsWhiteSpace(ch) || (ch == '<') || (ch == '>')) { char_buffer [pos++] = ch; } else if (ch == '\\') { char_buffer [pos++] = '\\'; char_buffer [pos++] = '\\'; } else if ((ch == '\'') || (ch == '`')) { char_buffer [pos++] = ch; } else { char_buffer [pos++] = '\\'; char_buffer [pos++] = hex_chars [(ch & 0xf0) >> 4]; char_buffer [pos++] = hex_chars [ch & 0x0f]; } } string str = new String(char_buffer, 0, pos); sb.Append(str); offset += size; } return(sb.ToString()); }
internal override long GetDynamicSize(TargetMemoryAccess target, TargetBlob blob, TargetLocation location, out TargetLocation dynamic_location) { int element_size = Type.GetElementSize (target); dynamic_location = location.GetLocationAtOffset (Type.Size); return element_size * GetLength (target); }
void Start() { location = this.GetComponent <TargetLocation>(); timer = FindObjectOfType <TimerController>(); stiRateBar.fillAmount = (location.STIRate + 10) / 100f; teenPregRateBar.fillAmount = (location.TeenPregRate + 10) / 100f; crimeRateBar.fillAmount = (location.CrimeRate + 10) / 100f; }
public void Read(GamePacketReader reader) { CastingId = reader.ReadUInt(); Location.Read(reader); TargetUnitId = reader.ReadUInt(); TargetLocation.Read(reader); Position.Read(reader); }
// Use this for initialization void Start() { location = this.GetComponent<TargetLocation> (); timer = FindObjectOfType<TimerController> (); stiRateBar.fillAmount = location.STIRate / 100f; teenPregRateBar.fillAmount = location.TeenPregRate / 100f; commhealthBar.fillAmount = location.CommunityHealth/ 100f; }
internal override long GetDynamicSize(TargetMemoryAccess target, TargetBlob blob, TargetLocation location, out TargetLocation dynamic_location) { TargetBinaryReader reader = blob.GetReader (); reader.Position = Type.ObjectSize; dynamic_location = location.GetLocationAtOffset (Type.ObjectSize + 4); return reader.ReadInteger (4) * 2; }
internal override long GetDynamicSize(TargetMemoryAccess target, TargetBlob blob, TargetLocation location, out TargetLocation dynamic_location) { int element_size = Type.GetElementSize(target); dynamic_location = location.GetLocationAtOffset(Type.Size); return(element_size * GetLength(target)); }
public bool ValidateTarget(TargetLocation targetLocation) { if (GameManager.Instance.CurrentGameLevel.TilesByLocation.TryGetValue(targetLocation.TargetGridLocation, out Tile targetTile)) { ObjectDirection direction = targetLocation.TargetDirection; if (targetTile.Walkable) { Tile currentTile = GameManager.Instance.CurrentGameLevel.TilesByLocation[CurrentGridLocation]; BridgePiece bridgePieceOnCurrentTile = currentTile.TryGetBridgePiece(); BridgePiece bridgePieceOnTarget = targetTile.TryGetBridgePiece(); // optimisation: keep bridge locations of the level in a separate list, so we don't have to go over all the tiles in the level // there are no bridges involved if (bridgePieceOnCurrentTile == null && bridgePieceOnTarget == null) { return(true); } // Make sure we go in the correct bridge direction if (bridgePieceOnCurrentTile && bridgePieceOnTarget) { if (bridgePieceOnCurrentTile.BridgePieceDirection == BridgePieceDirection.Horizontal && bridgePieceOnTarget.BridgePieceDirection == BridgePieceDirection.Horizontal && (direction == ObjectDirection.Left || direction == ObjectDirection.Right)) { return(true); } if (bridgePieceOnCurrentTile.BridgePieceDirection == BridgePieceDirection.Vertical && bridgePieceOnTarget.BridgePieceDirection == BridgePieceDirection.Vertical && (direction == ObjectDirection.Up || direction == ObjectDirection.Down)) { return(true); } return(false); } if ((bridgePieceOnCurrentTile?.BridgePieceDirection == BridgePieceDirection.Horizontal || bridgePieceOnTarget?.BridgePieceDirection == BridgePieceDirection.Horizontal) && (direction == ObjectDirection.Left || direction == ObjectDirection.Right)) { return(true); } if ((bridgePieceOnCurrentTile?.BridgePieceDirection == BridgePieceDirection.Vertical || bridgePieceOnTarget?.BridgePieceDirection == BridgePieceDirection.Vertical) && (direction == ObjectDirection.Up || direction == ObjectDirection.Down)) { return(true); } return(false); } } return(false); }
internal NativeStructObject GetParentObject(TargetMemoryAccess target, TargetLocation location) { if (!HasParent) { throw new InvalidOperationException(); } location = base_info.GetBaseLocation(target, location); return(new NativeStructObject(base_info.BaseType, location)); }
public void ParseQuantity_Returns_Valid_Number(string firstParam, int expectedValue) { var result = new TargetResult { FirstParameter = firstParam }; var quantity = TargetLocation.ParseQuantity(result).Quantity; quantity.Should().Be(expectedValue); }
internal override long GetDynamicSize(TargetMemoryAccess target, TargetBlob blob, TargetLocation location, out TargetLocation dynamic_location) { TargetBinaryReader reader = blob.GetReader(); reader.Position = Type.ObjectSize; dynamic_location = location.GetLocationAtOffset(Type.ObjectSize + 4); return(reader.ReadInteger(4) * 2); }
public void CompleteActiveMission() { ++MissionCounter; UIManager.Instance.ShowLocationMarker(null); TargetLocation.SetTarget(false); OnMissionCompleted.Invoke(); GameManager.Instance.StartConcert(TargetLocation); TargetLocation = null; }
private IEnumerable <TargetLocation> GetTargetLocationsWormholes() { var targetLocations = new List <TargetLocation>(); foreach (Wormhole wormhole in game.GetAllWormholes().Where(wormhole => MakesSenseToPushWormhole(wormhole))) { var targetLocation = new TargetLocation(wormhole.Location, LocationType.Wormhole, GetWormholePriority(wormhole), wormhole, this); targetLocations.Add(targetLocation); } return(targetLocations); }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
public override string PrintLocation(StackFrame frame) { TargetLocation location = GetLocation(frame); if (location == null) { return(null); } return(location.Print()); }
/// <summary> /// Maps the target location to target location API dto. /// </summary> /// <returns>The target location to target location API dto.</returns> /// <param name="targetLocation">Target location.</param> public TargetLocationApiDto MapTargetLocationToTargetLocationApiDto(TargetLocation targetLocation) { return(new TargetLocationApiDto() { City = targetLocation.City, TargetLocationId = targetLocation.TargetLocationId, UserId = targetLocation.User.UserId, PostalCode = targetLocation.PostalCode, City2 = targetLocation.City2 }); }
void Start() { _gameManager = FindObjectOfType <GameManager>(); _audioManager = AudioManager.instance; OnHoverTool = this.GetComponent <OnHover>(); _theGSB = FindObjectOfType <GlobalStatsBar>(); _myTargetLocation = this.transform.parent.GetComponentInParent <TargetLocation>(); _myBoxCollider = this.GetComponent <BoxCollider2D>(); _mySpriteRenderer = this.GetComponent <SpriteRenderer> (); BorderRenderer.color = _mySpriteRenderer.color; _ttManager = FindObjectOfType <TutorialToolTipManager>(); }
internal void SetObject(StackFrame frame, TargetMemoryAccess target, TargetObject obj) { TargetLocation location = GetLocation(frame, target); if (location == null) { throw new LocationInvalidException(); } type.SetObject(target, location, (TargetObject)obj); }
internal override TargetObject GetDereferencedObject(TargetMemoryAccess target) { if (Type.StaticType is TargetPointerType) { TargetLocation loc = GetDereferencedLocation(); return(Type.StaticType.GetObject(target, loc)); } else { return(Type.StaticType.GetObject(target, Location)); } }
public void Write(SpellTargetData data) { data.Flags = m_targetMask; if (m_targetMask.HasAnyFlag(SpellCastTargetFlags.Unit | SpellCastTargetFlags.CorpseAlly | SpellCastTargetFlags.Gameobject | SpellCastTargetFlags.CorpseEnemy | SpellCastTargetFlags.UnitMinipet)) { data.Unit = m_objectTargetGUID; } if (m_targetMask.HasAnyFlag(SpellCastTargetFlags.Item | SpellCastTargetFlags.TradeItem) && m_itemTarget) { data.Item = m_itemTarget.GetGUID(); } if (m_targetMask.HasAnyFlag(SpellCastTargetFlags.SourceLocation)) { data.SrcLocation.HasValue = true; TargetLocation target = new TargetLocation(); target.Transport = m_src.TransportGUID; // relative position guid here - transport for example if (!m_src.TransportGUID.IsEmpty()) { target.Location = m_src.TransportOffset; } else { target.Location = m_src.Position; } data.SrcLocation.Value = target; } if (Convert.ToBoolean(m_targetMask & SpellCastTargetFlags.DestLocation)) { data.DstLocation.HasValue = true; TargetLocation target = new TargetLocation(); target.Transport = m_dst.TransportGUID; // relative position guid here - transport for example if (!m_dst.TransportGUID.IsEmpty()) { target.Location = m_dst.TransportOffset; } else { target.Location = m_dst.Position; } data.DstLocation.Value = target; } if (Convert.ToBoolean(m_targetMask & SpellCastTargetFlags.String)) { data.Name = m_strTarget; } }
private void Start() { _title = MessageBox.transform.Find("Title").GetComponent <Text>(); _messageText = MessageBox.transform.Find("Title/MessageText").GetComponent <Text>(); MessageBox.SetActive(false); _theGameManager = FindObjectOfType <GameManager>().GetComponent <GameManager>(); _ashPark = GameObject.Find("World Map/Ash Park").GetComponent <TargetLocation>(); _freemason = GameObject.Find("World Map/Freemason").GetComponent <TargetLocation>(); _philmont = GameObject.Find("World Map/Philmont").GetComponent <TargetLocation>(); _quinnSquare = GameObject.Find("World Map/Quinn Square").GetComponent <TargetLocation>(); _eastBeaHeights = GameObject.Find("World Map/East Bea Heights").GetComponent <TargetLocation>(); _theTTTMan = FindObjectOfType <TutorialToolTipManager>(); }
internal override TargetObject GetElement(TargetMemoryAccess target, int[] indices) { int offset = GetArrayOffset(target, indices); TargetLocation new_location = Location.GetLocationAtOffset(offset); if (Type.ElementType.IsByRef) { new_location = new_location.GetDereferencedLocation(); } return(Type.ElementType.GetObject(target, new_location)); }
public override int GetHashCode() { unchecked { var hashCode = EnergyCost; hashCode = (hashCode * 397) ^ InstanceId; hashCode = (hashCode * 397) ^ PlayerIndex; hashCode = (hashCode * 397) ^ (PowerId?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ SupplyCost; hashCode = (hashCode * 397) ^ (TargetLocation != null ? TargetLocation.GetHashCode() : 0); return(hashCode); } }
public override bool Move(GameObject target) { TargetLocation ameliaLocation = FindTarget(target); if (facingRight && ameliaLocation == TargetLocation.Left) { ChangeDirection(); } else if (!facingRight && ameliaLocation == TargetLocation.Right) { ChangeDirection(); } return(true); }
public override int GetHashCode() { unchecked { int hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ CardId.GetHashCode(); hashCode = (hashCode * 397) ^ InstanceId; hashCode = (hashCode * 397) ^ ManaCost; hashCode = (hashCode * 397) ^ PlayerIndex; hashCode = (hashCode * 397) ^ ProvidedByScenario.GetHashCode(); hashCode = (hashCode * 397) ^ SpawnAtBase.GetHashCode(); hashCode = (hashCode * 397) ^ (TargetLocation != null ? TargetLocation.GetHashCode() : 0); return(hashCode); } }
protected string ReadString(TargetMemoryAccess target, TargetLocation start) { if (start.HasAddress && start.GetAddress (target).IsNull) return "null"; StringBuilder sb = new StringBuilder (); bool done = false; int offset = 0; while (!done && (offset < MaximumDynamicSize)) { TargetLocation location = start.GetLocationAtOffset (offset); byte[] buffer = location.ReadBuffer (target, ChunkSize); int pos = 0; int size = buffer.Length; char[] char_buffer = new char [size * 3]; for (int i = 0; i < size; i++) { if (buffer [i] == 0) { done = true; break; } char ch = (char) buffer [i]; if (Char.IsLetterOrDigit (ch) || Char.IsPunctuation (ch) || Char.IsWhiteSpace (ch) || (ch == '<') || (ch == '>')) char_buffer [pos++] = ch; else if (ch == '\\') { char_buffer [pos++] = '\\'; char_buffer [pos++] = '\\'; } else if ((ch == '\'') || (ch == '`')) { char_buffer [pos++] = ch; } else { char_buffer [pos++] = '\\'; char_buffer [pos++] = hex_chars [(ch & 0xf0) >> 4]; char_buffer [pos++] = hex_chars [ch & 0x0f]; } } string str = new String (char_buffer, 0, pos); sb.Append (str); offset += size; } return sb.ToString (); }
public NativePointerObject(NativePointerType type, TargetLocation location) : base(type, location) { }
protected override TargetObject DoGetObject(TargetMemoryAccess target, TargetLocation location) { ResolveClass (target, true); return new MonoClassObject (this, class_info, location); }
internal TargetClassObject GetCurrentObject(TargetMemoryAccess target, TargetLocation location) { // location.Address resolves to the address of the MonoObject, // dereferencing it once gives us the vtable, dereferencing it // twice the class. TargetAddress address; address = target.ReadAddress (location.GetAddress (target)); address = target.ReadAddress (address); TargetType current = File.MonoLanguage.ReadMonoClass (target, address); if (current == null) return null; if (IsByRef && !current.IsByRef) // Unbox location = location.GetLocationAtOffset ( 2 * target.TargetMemoryInfo.TargetAddressSize); return (TargetClassObject) current.GetObject (target, location); }
internal TargetStructObject(TargetStructType type, TargetLocation location) : base(type, location) { this.Type = type; }
public MonoGenericInstanceObject(MonoGenericInstanceType type, MonoClassInfo info, TargetLocation location) : base(type, location) { this.type = type; }
protected override TargetObject DoGetObject(TargetMemoryAccess target, TargetLocation location) { return new NativeFunctionObject (this, location); }
protected override TargetObject DoGetObject(TargetMemoryAccess target, TargetLocation location) { return new NativeArrayObject (this, location, bounds); }
public MonoPointerObject(MonoPointerType type, TargetLocation location) : base(type, location) { this.Type = type; }
internal override long GetDynamicSize(TargetMemoryAccess target, TargetBlob blob, TargetLocation location, out TargetLocation dynamic_location) { throw new InvalidOperationException (); }
public NativeFunctionObject(NativeFunctionPointer type, TargetLocation location) : base(type, location) { this.Type = type; }
public PersonLocationMessage(TargetLocation personLocation) { targetLocation = personLocation; }
internal TargetGenericInstanceObject(TargetGenericInstanceType type, TargetLocation location) : base(type, location) { this.Type = type; }
protected override TargetObject DoGetObject(TargetMemoryAccess target, TargetLocation location) { return new MonoPointerObject (this, location); }
protected override TargetObject DoGetObject(TargetMemoryAccess target, TargetLocation location) { throw new TargetException (TargetError.LocationInvalid, "Cannot access variables of type `{0}'", Name); }
XObject InsertTarget(TargetLocation target) { if (target.Position == TargetPosition.Undefined) return null; var sourceAttr = target.Source as XAttribute; if (sourceAttr != null) { var targetNode = target.Target as XElement; if (targetNode != null) { var attr = targetNode.Attribute(sourceAttr.Name); if (attr != null) { attr.Value = sourceAttr.Value; return attr; } targetNode.Add(sourceAttr); return sourceAttr; } var targetAttr = target.Target as XAttribute; if (targetAttr != null) { if (target.Position == TargetPosition.Node) { targetAttr.Value = sourceAttr.Value; return targetAttr; } if (target.Position == TargetPosition.Before) { throw new InvalidOperationException(); } if (target.Position == TargetPosition.After) { throw new InvalidOperationException(); } } } var sourceNode = target.Source as XNode; if (sourceNode != null) { var targetCntr = target.Target as XContainer; if (targetCntr != null) { if (target.Position == TargetPosition.Node) { targetCntr.Add(sourceNode); return sourceNode; } } var targetNode = target.Target as XNode; if (targetNode != null) { if (target.Position == TargetPosition.Before) { targetNode.AddBeforeSelf(sourceNode); return sourceNode; } if (target.Position == TargetPosition.After) { targetNode.AddAfterSelf(sourceNode); return sourceNode; } } } throw new InvalidOperationException(); }
public NativeStructObject(NativeStructType type, TargetLocation location) : base(type, location) { this.type = type; }
internal TargetClassObject(TargetClassType type, TargetLocation location) : base(type, location) { this.Type = type; }
public NativeOpaqueObject(NativeOpaqueType type, TargetLocation location) : base(type, location) { }
public DangerLocationMessage(TargetLocation dangerLocation) { this.targetLocation = dangerLocation; }
protected override TargetObject DoGetObject(TargetMemoryAccess target, TargetLocation location) { throw new InvalidOperationException (); }
protected override TargetObject DoGetObject(TargetMemoryAccess target, TargetLocation location) { throw new InternalError (); }
public NativeArrayObject(NativeArrayType type, TargetLocation location, TargetArrayBounds bounds) : base(type, location) { this.bounds = bounds; }
internal TargetPointerObject(TargetPointerType type, TargetLocation location) : base(type, location) { this.Type = type; }
public MonoObjectObject(MonoObjectType type, TargetLocation location) : base(type, location) { this.Type = type; }