Пример #1
0
 internal void Verify(FrontendCompiler context, PackageItem parentItem)
 {
     if (this.Name == BackgroundTaskType.Invalid)
     {
         context.OnMessage(new CompilerMessageEventArgs(CompilerMessage.RequiredAttribute("AdditionalTask", "Name"), parentItem));
     }
 }
Пример #2
0
 internal void Verify(FrontendCompiler context, PackageItem parentItem)
 {
     if (String.IsNullOrEmpty(this.Name))
     {
         context.OnMessage(new CompilerMessageEventArgs(CompilerMessage.RequiredAttribute(this.typeName, "Name"), parentItem));
     }
 }
Пример #3
0
        protected override void OnResolveBegin(FrontendCompiler context)
        {
            if (String.IsNullOrEmpty(this.Name) && String.IsNullOrEmpty(this.Source))
            {
                context.OnMessage(new CompilerMessageEventArgs(CompilerMessage.FileMissingNameAndSource(), this));
            }
            else if (String.IsNullOrEmpty(this.Name) || this.Name.EndsWith("\\", StringComparison.Ordinal))
            {
                this.Name = IO.Path.Combine(this.Name ?? String.Empty, IO.Path.GetFileName(this.Source));
            }

            // TODO: error if name ends with "\".

            base.OnResolveBegin(context);

            // TODO: error if name is empty.

            if (String.IsNullOrEmpty(this.Source))
            {
                // TODO: walk the parent tree to see if a source is available.

                this.Source = IO.Path.Combine(this.ParentRelativePathFromName ?? String.Empty, this.Name);
            }
            else if (this.Source.EndsWith("\\", StringComparison.Ordinal))
            {
                this.Source = IO.Path.Combine(this.Source, this.ParentRelativePathFromName ?? String.Empty, this.Name);
            }
        }
Пример #4
0
        protected override void OnResolveBegin(FrontendCompiler context)
        {
            base.OnResolveBegin(context);

            if (this.Foreground == TileForeground.Invalid)
            {
                context.OnMessage(new CompilerMessageEventArgs(CompilerMessage.RequiredAttribute("Tile", "Foreground"), this));
            }

            if (String.IsNullOrEmpty(this.Background))
            {
                context.OnMessage(new CompilerMessageEventArgs(CompilerMessage.RequiredAttribute("Tile", "Background"), this));
            }

            // TODO: verify the colors are valid
        }
Пример #5
0
        protected override void OnResolveBegin(FrontendCompiler context)
        {
            base.OnResolveBegin(context);

            if (String.IsNullOrEmpty(this.Id))
            {
                context.OnMessage(new CompilerMessageEventArgs(CompilerMessage.GroupMissingId(), this));
            }
        }
        protected override void OnResolveBegin(FrontendCompiler context)
        {
            base.OnResolveBegin(context);

            if (this.SupportedFileExtensions.Count == 0)
            {
                context.OnMessage(new CompilerMessageEventArgs(CompilerMessage.RequiredElement("FileSavePicker", "FileExtension"), this));
            }
            else
            {
                this.SupportedFileExtensions.ForEach(df => df.Verify(context, this));
            }
        }
        protected override void OnResolveBegin(FrontendCompiler context)
        {
            base.OnResolveBegin(context);

            if (this.Name == BackgroundTaskType.Invalid)
            {
                context.OnMessage(new CompilerMessageEventArgs(CompilerMessage.RequiredAttribute("BackgroundTask", "Name"), this));
            }

            foreach (AdditionalTask at in this.AdditionalTasks)
            {
                at.Verify(context, this);
            }
        }
Пример #8
0
        protected override void OnResolveBegin(FrontendCompiler context)
        {
            base.OnResolveBegin(context);

            if (this.SupportedDataFormats.Count == 0)
            {
                context.OnMessage(new CompilerMessageEventArgs(CompilerMessage.RequiredElement("ShareTarget", "DataFormat"), this));
            }
            else
            {
                foreach (SupportedDataFormat df in this.SupportedDataFormats)
                {
                    df.Verify(context, this);
                }
            }
        }
Пример #9
0
        protected override void OnResolveBegin(FrontendCompiler context)
        {
            if (String.IsNullOrEmpty(this.Name))
            {
                context.OnMessage(new CompilerMessageEventArgs(CompilerMessage.ApplicationNameRequired(), this));

                if (String.IsNullOrEmpty(this.Id))
                {
                    this.Id = "$invalid_application_id$";
                }
            }
            else if (String.IsNullOrEmpty(this.Id))
            {
                this.Id = this.Name.Replace('.', '_');
            }

            base.OnResolveBegin(context);
        }