internal unsafe StoreTripleResponse_Accessor(byte *_CellPtr , ResizeFunctionDelegate func ) { m_ptr = _CellPtr; ResizeFunction = func; RefId_Accessor_Field = new GuidAccessor(null); Subject_Accessor_Field = new StringAccessor(null, (ptr, ptr_offset, delta) => { int substructure_offset = (int)(ptr - this.m_ptr); this.m_ptr = this.ResizeFunction(this.m_ptr, ptr_offset + substructure_offset, delta); return(this.m_ptr + substructure_offset); }); Predicate_Accessor_Field = new StringAccessor(null, (ptr, ptr_offset, delta) => { int substructure_offset = (int)(ptr - this.m_ptr); this.m_ptr = this.ResizeFunction(this.m_ptr, ptr_offset + substructure_offset, delta); return(this.m_ptr + substructure_offset); }); Object_Accessor_Field = new StringAccessor(null, (ptr, ptr_offset, delta) => { int substructure_offset = (int)(ptr - this.m_ptr); this.m_ptr = this.ResizeFunction(this.m_ptr, ptr_offset + substructure_offset, delta); return(this.m_ptr + substructure_offset); }); }
/// <summary> /// Determines whether this instance and a specified object have the same value. /// </summary> /// <param name="obj">The GuidAccessor to compare to this instance.</param> /// <returns>true if <paramref name="obj" /> is a GuidAccessor and its value is the same as this instance; otherwise, false.</returns> public override bool Equals(object obj) { GuidAccessor b = obj as GuidAccessor; if (b == null) { return(false); } return(this == b); }
/// /// <summary> /// Converts the string representation of a GUID to the equivalent <see cref="InKnowWorks.TripleStoreMemoryCloud.Protocols.TSL.GuidAccessor"/> /// structure. /// </summary> /// <param name="input"> /// The GUID to convert. /// </param> /// <param name="value"> /// The structure that will contain the parsed value. /// </param> /// /// <returns> /// true if the parse operation was successful; otherwise, false. /// </returns> /// public static bool TryParse(string input, out GuidAccessor value) { Guid val; if (Guid.TryParse(input, out val)) { value = val; return(true); } else { value = null; return(false); } }