protected RemoteComponent(string name, string nickname, string description, string category, string subcategory, int mayorVersion, int minorVersion, int revisionVersion) : base(name, nickname, description, category, subcategory) { _version = new GH_IO.Types.GH_Version(mayorVersion, minorVersion, revisionVersion); _isHeadless = Rhino.RhinoApp.IsRunningHeadless; }
public override bool Read(GH_IReader reader) { bool rc = base.Read(reader); if (rc) { _version = reader.GetVersion(TagVersion); string path = reader.GetString(TagPath); try { RemoteDefinitionLocation = path; } catch (System.Net.WebException) { // this can happen if a server is not responding and is acceptable in this // case as we want to read without throwing exceptions } bool cacheResults = _cacheResultsOnServer; if (reader.TryGetBoolean(TagCacheResultsOnServer, ref cacheResults)) { _cacheResultsOnServer = cacheResults; } cacheResults = _cacheResultsInMemory; if (reader.TryGetBoolean(TagCacheResultsInMemory, ref cacheResults)) { _cacheResultsInMemory = cacheResults; } } return(rc); }