private void ValidateParameters()

in SamplesV1/AzureAnalysisServicesProcessSample/ProcessAzureASActivity.cs [134:157]


        private void ValidateParameters(IEnumerable<LinkedService> linkedServices, IEnumerable<Dataset> datasets,
                  Activity activity, IActivityLogger logger)
        {
            if (linkedServices == null) throw new ArgumentNullException("linkedServices");
            if (datasets == null) throw new ArgumentNullException("datasets");
            if (activity == null) throw new ArgumentNullException("activity");
            if (logger == null) throw new ArgumentNullException("logger");

            // Verify datasets
            if (activity.Outputs.Count != 1) throw new ArgumentException("Only one output datasets is required, as a dummy");

            foreach (LinkedService ls in linkedServices)
                logger.Write("Detected linkedService.Name {0}", ls.Name);

            DotNetActivity dotNetActivity = (DotNetActivity)activity.TypeProperties;

            // Ensure required parameters are included
            if (!dotNetActivity.ExtendedProperties.ContainsKey(ADV_AS_PROCESS_SCRIPT_PATH_PARAMETER_NAME)) {
                if (!dotNetActivity.ExtendedProperties.ContainsKey(TABULAR_DATABASE_NAME_PARAMETER_NAME)) throw new ArgumentException(TABULAR_DATABASE_NAME_PARAMETER_NAME);
            }
            if (!dotNetActivity.ExtendedProperties.ContainsKey(AZUREAS_CONNECTION_STRING_PARAMETER_NAME)) throw new ArgumentException(AZUREAS_CONNECTION_STRING_PARAMETER_NAME);

            logger.Write("Parameters validated");
        }