public static string GetGlobalID(IIdentifierContainer[] _collection, string _platformID) { IIdentifierContainer _object = _collection.FindObjectWithPlatformID(_platformID); if (_object == null) { return(_platformID); } return(_object.GlobalID); }
public static string GetPlatformID(IIdentifierContainer[] _collection, string _globalID) { IIdentifierContainer _object = _collection.FindObjectWithGlobalID(_globalID); if (_object == null) { return(null); } return(_object.PlatformIDs.GetCurrentPlatformID()); }
public static string GetCurrentPlatformID(this IIdentifierContainer _object) { PlatformValue _platform = PlatformValueHelper.GetCurrentPlatformValue(_array: _object.PlatformIDs); if (_platform == null) { return(null); } return(_platform.Value); }
/// <summary> /// A private helper method to check for an IIdentifierContainer's /// VariableIdNode. /// </summary> /// <returns>An IProperty.</returns> /// <param name="node">Node.</param> private IProperty getVariableProperty(IIdentifierContainer node) { // if the variable node is not set, report an error and return // a VoidProperty to signal this one doesn't evaluate if (node.IDNode == null) { analyzer.notifyError(new UninitializedVariableError(node)); return(voidProperty); } VariableIdNode idNode = node.IDNode; // check the evaluation type of the id node IProperty property = idNode.Accept(this.typeChecker).asProperty(); // if it wasn't declared, report an error if (property.GetTokenType() == TokenType.ERROR) { analyzer.notifyError(new UninitializedVariableError(node)); return(voidProperty); } return(property); }
public static string GetCurrentPlatformID(this IIdentifierContainer _object) { return(_object.PlatformIDs.GetCurrentPlatformID()); }