Пример #1
0
        private static EffectIdentifierResponse RemoveEffect(ChromaApi api, string effectId)
        {
            if (api == null)
            {
                Debug.LogError("RemoveEffect: Parameter api is null!");
                return(null);
            }
            if (string.IsNullOrEmpty(effectId))
            {
                Debug.LogError("RemoveEffect: Parameter effectId cannot be null or empty!");
                return(null);
            }
            EffectIdentifierInput data = new EffectIdentifierInput(effectId, null);

            try
            {
                return(api.RemoveEffect(data));
            }
            catch (Exception)
            {
            }
            return(null);
        }
Пример #2
0
        private static EffectIdentifierResponse SetEffect(ChromaApi api, string effectId)
        {
            if (null == api)
            {
                Debug.LogError("SetEffect: Parameter api is null!");
                return(null);
            }
            if (string.IsNullOrEmpty(effectId))
            {
                Debug.LogError("SetEffect: Parameter effectId cannot be null or empty!");
                return(null);
            }

            var input = new EffectIdentifierInput(effectId, null);

            try
            {
                return(api.PutEffect(input));
            }
            catch (Exception)
            {
            }
            return(null);
        }