/// <summary> /// Create a ScopedCustomVariableSlots to contain a number of slots for a given scope. /// </summary> /// <param name="scope">Scope of the custom variables held in the slots.</param> internal ScopedCustomVariableSlots(CustomVariableScope scope) { if (!Enum.IsDefined(typeof(CustomVariableScope), scope) || scope == CustomVariableScope.None) throw new ArgumentOutOfRangeException("scope"); this.scope = scope; }
/// <summary> /// Create a new ScopedCustomVariableSlot with a given variable, scope and slot index. /// </summary> /// <param name="scope">Scope of this custom variable.</param> /// <param name="variable">Custom variable.</param> /// <param name="slot">Slot index for this custom variable.</param> public ScopedCustomVariableSlot(CustomVariableScope scope, ICustomVariable variable, int slot) { if (!Enum.IsDefined(typeof(CustomVariableScope), scope)) throw new ArgumentOutOfRangeException("scope"); this.scope = scope; this.variable = variable; this.slot = slot; }
/// <summary> /// Create a new ScopedCustomVariableSlot with a given variable, scope and slot index. /// </summary> /// <param name="scope">Scope of this custom variable.</param> /// <param name="variable">Custom variable.</param> /// <param name="slot">Slot index for this custom variable.</param> public ScopedCustomVariableSlot(CustomVariableScope scope, ICustomVariable variable, int slot) { if (!Enum.IsDefined(typeof(CustomVariableScope), scope)) { throw new ArgumentOutOfRangeException("scope"); } this.scope = scope; this.variable = variable; this.slot = slot; }
/// <summary> /// Get the numeric identity of visitor and session level scopes. /// </summary> /// <param name="scope">Scope to obtain the identity of.</param> /// <returns>Scope numeric identity of this scope or null if no scope or is Activity.</returns> private static string GetScopeIdentity(CustomVariableScope? scope) { return !scope.HasValue || scope == CustomVariableScope.Activity ? null : ((int)scope).ToString(CultureInfo.InvariantCulture); }
public ScopedCustomVariable(CustomVariableScope scope, ICustomVariable variable) { this.scope = scope; this.variable = variable; }
public void SetCustomVariable(int variableID, string variableName, string variableValue, CustomVariableScope variableScope) { }
public void SetCustomVariable(int variableID, string variableName, string variableValue, CustomVariableScope variableScope) { try { var scope = (variableScope == CustomVariableScope.ApplicationLaunch) ? CustomVar.Scopes.visit : CustomVar.Scopes.page; _piwikTracker.setCustomVariable(variableID, variableName, variableValue, scope); } catch {} }