VI.Projector/VI.Projector.Connection.Remoting.Proxies/SystemAttachedDataStoreProxyClient.cs
Decompiler Source FileVI.Projector.SystemAttachedDataStoreProxyClientDecompiled Source
Interpretation
- Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.
Relations
- CallMethod: Put at line 69
- CallMethod: Flush at line 177
Typed Edges
- No typed edges extracted for this source.
References
- No direct source references extracted.
Referenced By
- No direct source references extracted.
C# source-derived context
Generated by pattern extraction from the decompiled C# source and decompile index. This is factual source evidence, not inferred behavior.
references DB/Dialog objects
Summary: classes SystemAttachedDataStoreProxyClient, SystemAttachedDataStoreProxyClientDto; methods RestoreData, Put, Get, HasData, Clear, Remove; references ESet; markers references DB/Dialog objects
Classes
SystemAttachedDataStoreProxyClient SystemAttachedDataStoreProxyClientDtoMethods
DB/Dialog object references
OIM key/entity markers
None extracted.API/entity calls
None extracted.Registrations / handlers
None extracted.
Complete Source
1using System;2using System.Collections.Generic;3using System.Linq;4using System.Runtime.CompilerServices;5using System.Threading;6using VI.Base;7using VI.Projector.Connection.Data;8using VI.Projector.Data;9using VI.Projector.Schema;10using VI.Remoting.Serialization;11using VI.Remoting.Services;1213namespace VI.Projector.Connection.Remoting.Proxies;1415/// <summary>16/// Proxy for a ISystemAttachedDataStore.17/// </summary>18/// <summary>19/// Proxy for a ISystemAttachedDataStore.20/// </summary>21/// <summary>22/// Proxy for a ISystemAttachedDataStore.23/// </summary>24public sealed class SystemAttachedDataStoreProxyClient : RemoteServiceProxyClientBase, ISystemAttachedDataStore, IDisposableCheck, System.IDisposable25{26 /// <summary>27 /// The DTO.28 /// </summary>29 private class SystemAttachedDataStoreProxyClientDto : RemoteServiceProxyClientDto30 {31 public override object RestoreData()32 {33 return new SystemAttachedDataStoreProxyClient(DtoExporter.ConvertFromDtoData<RemoteServiceDescriptor>(base.ServiceDescriptor));34 }35 }3637 /// <summary>38 /// Defines a interface to an object that can help to improve remoting performance.39 /// </summary>40 public interface IRemotingSupport41 {42 bool HasData(string source, ISystemObjectData systemObject, ISchemaProperty property);4344 bool HasData(ISystemObjectData systemObject);45 }4647 private readonly ResetLazy<IRemotingSupport> m_RemotingSupport;4849 protected override System.Type DtoType => typeof(SystemAttachedDataStoreProxyClientDto);5051 /// <summary>52 /// Default constructor of class SystemAttachedDataStoreProxy.53 /// </summary>54 public SystemAttachedDataStoreProxyClient(RemoteServiceDescriptor proxyInfo)55 : base(proxyInfo)56 {57 m_RemotingSupport = new ResetLazy<IRemotingSupport>([CompilerGenerated] () => CallFunction<IRemotingSupport>("GetClientRemotingSupport", System.Array.Empty<ParameterInfo>()), (LazyThreadSafetyMode)2);58 }5960 /// <summary>61 /// Puts data of the given system object into the store.62 /// </summary>63 /// <param name="source">An optional source identifier.</param>64 /// <param name="systemObject">The system object that own the data.</param>65 /// <param name="propertyName">The property that data is to store.</param>66 /// <param name="value">The value to put.</param>67 public void Put(string source, ISystemObjectData systemObject, string propertyName, object value)68 {69 CallMethod("Put", ParameterInfo.Create("source", source), ParameterInfo.Create("systemObject", systemObject), ParameterInfo.Create("propertyName", propertyName), ParameterInfo.Create("value", value));70 }7172 /// <summary>73 /// Gets data of the given system object out of the store.74 /// </summary>75 /// <param name="source">An optional source identifier.</param>76 /// <param name="systemObject">The system object that own the data.</param>77 /// <param name="propertyName">The property that data is to get.</param>78 /// <returns>The value or null.</returns>79 public System.Collections.Generic.IEnumerable<object> Get(string source, ISystemObjectData systemObject, string propertyName)80 {81 if (_HasDataPreCheck(source, systemObject, propertyName) == false)82 {83 return Enumerable.Empty<object>();84 }85 return CallFunction<System.Collections.Generic.IEnumerable<object>>("Get", new ParameterInfo[3]86 {87 ParameterInfo.Create("source", source),88 ParameterInfo.Create("systemObject", systemObject),89 ParameterInfo.Create("propertyName", propertyName)90 });91 }9293 /// <summary>94 /// Gets the flag whether there is data stored for the given property.95 /// </summary>96 /// <param name="source">An optional source identifier.</param>97 /// <param name="systemObject">The system object that own the data.</param>98 /// <param name="propertyName">The property that data is to get.</param>99 /// <returns>The value or null.</returns>100 public bool HasData(string source, ISystemObjectData systemObject, string propertyName)101 {102 bool? flag = _HasDataPreCheck(source, systemObject, propertyName);103 if (flag.HasValue)104 {105 return flag.Value;106 }107 return CallFunction<bool>("HasData_3", new ParameterInfo[3]108 {109 ParameterInfo.Create("source", source),110 ParameterInfo.Create("systemObject", systemObject),111 ParameterInfo.Create("propertyName", propertyName)112 });113 }114115 /// <summary>116 /// Gets the flag whether there is data stored for the given object.117 /// </summary>118 /// <param name="systemObject">The system object that own the data.</param>119 /// <returns>The value or null.</returns>120 public bool HasData(ISystemObjectData systemObject)121 {122 bool? flag = _HasDataPreCheck(null, systemObject, null);123 if (flag.HasValue)124 {125 return flag.Value;126 }127 return CallFunction<bool>("HasData_1", new ParameterInfo[1] { ParameterInfo.Create("systemObject", systemObject) });128 }129130 /// <summary>131 /// Gets the flag whether there is any data stored for the given schema type.132 /// </summary>133 public bool HasData(string schemaTypeName)134 {135 return CallFunction<bool>("HasData_2", new ParameterInfo[1] { ParameterInfo.Create("schemaTypeName", schemaTypeName) });136 }137138 /// <summary>139 /// Clears the data of the given system object.140 /// </summary>141 /// <param name="source">An optional source identifier.</param>142 /// <param name="systemObject">The system object that own the data.</param>143 /// <param name="propertyName">The property that data is to clear.</param>144 public void Clear(string source, ISystemObjectData systemObject, string propertyName)145 {146 CallMethod<string>("Clear", new ParameterInfo[3]147 {148 ParameterInfo.Create("source", source),149 ParameterInfo.Create("systemObject", systemObject),150 ParameterInfo.Create("propertyName", propertyName)151 });152 }153154 /// <summary>155 /// Removes one value of the given object.156 /// </summary>157 /// <param name="source">An optional source identifier.</param>158 /// <param name="systemObject">The system object to remove the value.</param>159 /// <param name="propertyName">The property that owns the value.</param>160 /// <param name="value">The value to remove.</param>161 public void Remove(string source, ISystemObjectData systemObject, string propertyName, object value)162 {163 CallMethod<string>("Remove", new ParameterInfo[4]164 {165 ParameterInfo.Create("source", source),166 ParameterInfo.Create("systemObject", systemObject),167 ParameterInfo.Create("propertyName", propertyName),168 ParameterInfo.Create("value", value)169 });170 }171172 /// <summary>173 /// Forces the store to flush any data.174 /// </summary>175 public void Flush()176 {177 CallMethod("Flush");178 }179180 /// <summary>181 /// Maintains the data of the given connection.182 /// </summary>183 public void Maintain(ISystemConnection connection, SystemAttachedDataStoreMaintainOption option)184 {185 throw new ViException(1777321);186 }187188 /// <summary>189 /// Gets a summery of the data store contents.190 /// </summary>191 public SystemAttachedDataStoreSummary GetSummary()192 {193 return CallFunction<SystemAttachedDataStoreSummary>("GetSummary", System.Array.Empty<ParameterInfo>());194 }195196 /// <summary>197 /// Is called by the remote connector when data was committed.198 /// </summary>199 internal void InvalidateCachedData()200 {201 m_RemotingSupport.Reset();202 }203204 private bool? _HasDataPreCheck(string source, ISystemObjectData systemObject, string propertyName)205 {206 try207 {208 ISchema schema = base.Connector?.Schema;209 if (schema == null)210 {211 return null;212 }213 return m_RemotingSupport.Value.HasData(source, systemObject, schema[systemObject.SchemaTypeName, true][propertyName, true]);214 }215 catch (System.Exception ex)216 {217 base.Log.Debug("Error checking for HasData: " + ex.Message);218 }219 return null;220 }221222 bool IDisposableCheck.get_IsDisposed()223 {224 return base.IsDisposed;225 }226}227