public void patch(Ice.Object v) { if (v != null && !typeof(T).IsAssignableFrom(v.GetType())) { IceInternal.Ex.throwUOE(_type, v.ice_id()); } value = (T)v; }
private static Ice.Object IceCleanupEx(this Ice.Object obj) { var v = Activator.CreateInstance(obj.GetType()) as Ice.Object; var type = obj.GetType(); var id = type.GetProperty("id"); if (id != null) { id.SetValue(v, id.GetValue(obj)); } else { var name = type.GetProperty("name"); name.SetValue(v, name.GetValue(obj)); } return(v); }
public override void patch(Ice.Object v) { if (v != null && !typeof(T).IsAssignableFrom(v.GetType())) { IceInternal.Ex.throwUOE(type(), v.ice_id()); } _seq[_index] = (T)v; }
/// <summary> /// Sets the Ice object of the optional to the passed instance. /// </summary> /// <param name="v">The new object for the optional.</param> public void patch(Ice.Object v) { if (v == null || typeof(T).IsAssignableFrom(v.GetType())) { // // The line below must assign to the Value property. We could also // have written it this way: // // this.opt = (T)v; // // However, when v is null, the optional might be cleared, which // is not the result we want. // this.value = new Optional <T>((T)v); } else { IceInternal.Ex.throwUOE(_type, v.ice_id()); } }
public void patch(Ice.Object v) { if (v != null && !typeof(T).IsAssignableFrom(v.GetType())) { IceInternal.Ex.throwUOE(_type, v.ice_id()); } int count = _seq.Count; if (_index >= count) // Need to grow the sequence. { for (int i = count; i < _index; i++) { _seq.Add(default(T)); } _seq.Add((T)v); } else { _seq[_index] = (T)v; } }
public void patch(Ice.Object v) { if (v != null && !typeof(T).IsAssignableFrom(v.GetType())) { IceInternal.Ex.throwUOE(_type, v.ice_id()); } InvokeInfo info = getInvokeInfo(_seqType); int count = info.getCount(_seq); if (_index >= count) // Need to grow the sequence. { for (int i = count; i < _index; i++) { info.invokeAdd(_seq, default(T)); } info.invokeAdd(_seq, (T)v); } else { info.invokeSet(_seq, _index, (T)v); } }