public void checkSUnknown(Ice.AnyClass obj, Ice.Current current) { test(obj is SUnknown); SUnknown su = (SUnknown)obj; test(su.su.Equals("SUnknown.su")); }
internal void FirstSliceInit(AnyClass v, bool setSlicedData) { Debug.Assert(_current != null); // Add the instance to the map/list of instances. This must be done before reading the instances (for // circular references). _instanceMap ??= new List <AnyClass>(); _instanceMap.Add(v); // Read all the deferred indirection tables now that the instance is inserted in _instanceMap. if (_current.DeferredIndirectionTableList?.Count > 0) { int savedPos = _pos; Debug.Assert(_current.Slices?.Count == _current.DeferredIndirectionTableList.Count); for (int i = 0; i < _current.DeferredIndirectionTableList.Count; ++i) { int pos = _current.DeferredIndirectionTableList[i]; if (pos > 0) { _pos = pos; _current.Slices[i].Instances = Array.AsReadOnly(ReadIndirectionTable()); } // else remains empty } _pos = savedPos; } if (setSlicedData) { v.SlicedData = GetSlicedData(); } }
public Task checkSUnknownAsync(Ice.AnyClass obj, Ice.Current current) { test(obj is SUnknown); SUnknown su = (SUnknown)obj; test(su.su.Equals("SUnknown.su")); return(null); }
public void IceStartFirstSlice(string typeId, AnyClass v, bool setSlicedData = false) { Debug.Assert(InEncapsulation); Debug.Assert(_current != null && (_current.SliceTypeId == null || _current.SliceTypeId == typeId)); Debug.Assert(_current.InstanceType == InstanceType.Class); FirstSliceInit(v, setSlicedData); ReadIndirectionTableIntoCurrent(); }
private AnyClass[] ReadIndirectionTable() { int size = ReadAndCheckSeqSize(1); if (size == 0) { throw new InvalidDataException("invalid empty indirection table"); } var indirectionTable = new AnyClass[size]; for (int i = 0; i < indirectionTable.Length; ++i) { int index = ReadSize(); if (index < 1) { throw new InvalidDataException($"read invalid index {index} in indirection table"); } indirectionTable[i] = ReadInstance(index); } return(indirectionTable); }