text:
![1 stars](../../images/ic_star_black_18dp_1x.png)![1 stars](../../images/ic_star_border_black_18dp_1x.png)![1 stars](../../images/ic_star_border_black_18dp_1x.png)![1 stars](../../images/ic_star_border_black_18dp_1x.png)![1 stars](../../images/ic_star_border_black_18dp_1x.png) 1

To use the The Ultimate Hollywood Trivia skill, try saying...

* *Alexa, launch Hollywood trivia*

* *Repeat*

* *Help*

Hollywood or movie trivia is vital to breaking awkward silences and enlivening the dullest of evenings everywhere.  So prepare to dazzle your friends and become an instant movie buff with these trivia facts you might not know by playing the Ultimate Hollywood Trivia game.

This game is fun to play individually or compete with  family and friends to be crowned as the "The Ultimate Hollywood Trivia" king or queen!

***

### Skill Details

* **Invocation Name:** hollywood trivia
* **Category:** null
* **ID:** amzn1.echo-sdk-ams.app.ebbd4638-66e7-4e56-9daf-7c49c685eb5e
* **ASIN:** B01B5BVRD6
* **Author:** Priya
* **Release Date:** January 27, 2016 @ 16:55:57
* **In-App Purchasing:** No

redpajama_set_name: RedPajamaGithub


text:
package edu.iu.grid.oim.view.divrep;

import java.io.PrintWriter;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.TreeMap;

import org.apache.commons.lang.StringEscapeUtils;
import org.apache.log4j.Logger;

import com.divrep.DivRep;
import com.divrep.DivRepEvent;
import com.divrep.DivRepEventListener;
import com.divrep.common.DivRepFormElement;
import com.divrep.common.DivRepSelectBox;
import com.divrep.common.DivRepToggler;

import edu.iu.grid.oim.lib.Authorization;
import edu.iu.grid.oim.lib.StaticConfig;
import edu.iu.grid.oim.model.UserContext;
import edu.iu.grid.oim.model.db.FacilityModel;
import edu.iu.grid.oim.model.db.ResourceGroupModel;
import edu.iu.grid.oim.model.db.ResourceModel;
import edu.iu.grid.oim.model.db.SiteModel;
import edu.iu.grid.oim.model.db.record.FacilityRecord;
import edu.iu.grid.oim.model.db.record.ResourceGroupRecord;
import edu.iu.grid.oim.model.db.record.ResourceRecord;
import edu.iu.grid.oim.model.db.record.SiteRecord;
import edu.iu.grid.oim.model.db.record.VORecord;

public class ResourceGroupSelector extends DivRepFormElement<Integer> {

	static Logger log = Logger.getLogger(ResourceGroupSelector.class);
    private UserContext context;

    private DivRepSelectBox site;
    private DivRepSelectBox resource_group;

    public ResourceGroupSelector(DivRep parent, UserContext _context) {
		super(parent);
		context = _context;

		SiteModel smodel = new SiteModel(context);
		site = new DivRepSelectBox(this);
		site.setLabel("Site");
		LinkedHashMap<Integer, String> sites = new LinkedHashMap<Integer, String>();
		ArrayList<SiteRecord> srecs;
		try {
			srecs = smodel.getAll();
			Collections.sort(srecs, new Comparator<SiteRecord> (){
				public int compare(SiteRecord a, SiteRecord b) {
					return a.getName().compareToIgnoreCase(b.getName()); // We are comparing based on name
				}
			});
			for(SiteRecord srec : srecs) {
				sites.put(srec.id, srec.name);
			}
			site.setValues(sites);
			site.addEventListener(new DivRepEventListener() {
				public void handleEvent(DivRepEvent e) {
					if(site.getValue() == null) {
						resource_group.setNullLabel("(Please Select Site First)");
						resource_group.setValue(null);
						resource_group.setValues(new LinkedHashMap<Integer, String>());
						resource_group.validate();
						resource_group.redraw();
					} else {
						setValue(site.getValue(), null);
					}
				}
			});
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		resource_group = new DivRepSelectBox(this);
		resource_group.setLabel("Resource Group");
		resource_group.setNullLabel("(Please Select Site First)");

		/*
		ResourceGroupModel rgmodel = new ResourceGroupModel(context);
		try {
			ArrayList<SiteRecord> srecs = smodel.getAll();
			Collections.sort(srecs, new Comparator<SiteRecord> (){
				public int compare(SiteRecord a, SiteRecord b) {
					return a.getName().compareToIgnoreCase(b.getName()); // We are comparing based on name
				}
			});
			for(SiteRecord srec : srecs) {
				ArrayList<ResourceGroupRecord> rgrecs = rgmodel.getBySiteID(srec.id);
				LinkedHashMap<Integer, String> rgs = new LinkedHashMap<Integer, String>();
				for(ResourceGroupRecord rgrec : rgrecs) {
					rgs.put(rgrec.id, rgrec.name);
				}
				addGroup("(Site) " + srec.name, rgs);
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		*/

	}

    private void setValue(Integer site_id, Integer resource_group_id) {
		try {
			site.setValue(site_id);
			site.redraw();

			//load resource group list
			ResourceGroupModel rgmodel = new ResourceGroupModel(context);
			ArrayList<ResourceGroupRecord> rgrecs = rgmodel.getBySiteID(site_id);
			LinkedHashMap<Integer, String> rgs = new LinkedHashMap<Integer, String>();
			for(ResourceGroupRecord rgrec : rgrecs) {
				rgs.put(rgrec.id, rgrec.name);
			}

			if(resource_group_id == null) {
				//select first resource group if there is only 1 resource group
				if(rgrecs.size() == 1) {
					resource_group.setValue(rgrecs.get(0).id);
				} else {
					resource_group.setValue(null);
				}
			} else {
				resource_group.setValue(resource_group_id);
			}
			resource_group.setNullLabel("(Please Select)");
			resource_group.setValues(rgs);
			resource_group.validate();
			resource_group.redraw();
		} catch (SQLException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
    }

    public void setValue(Integer resource_group_id) {
		ResourceGroupModel rgmodel = new ResourceGroupModel(context);
		try {
			ResourceGroupRecord rgrec = rgmodel.get(resource_group_id);
			setValue(rgrec.site_id, resource_group_id);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    }
    public Integer getValue() {
    	return resource_group.getValue();
    }

	public void setRequired(Boolean b) {
		//super.setRequired(b);//don't set required on super.. we don't have any associated with it
		site.setRequired(b);
		resource_group.setRequired(b);
	}

	public void render(PrintWriter out) {
		out.write("
");
		site.render(out);
		out.write("
");
		resource_group.render(out);
		out.write("
");
		out.write("
");
	}

	protected void onEvent(DivRepEvent e) {
		// TODO Auto-generated method stub

	}
}


text:
imgurScraper

Bare minimum node app to pull data from imgur and store in a local MySQL database.


text:
<?php namespace Visualplus\Cdn;

use Illuminate\Support\ServiceProvider;

class CdnServiceProvider extends ServiceProvider {

    /**
     * @return void
     */
    public function boot()
    {
        $this->publishes([
            __DIR__.'/../config/cdn.php' => config_path('cdn.php')
        ], 'config');

        $this->publishes([
            __DIR__.'/../migrations/' => database_path('migrations')
        ], 'migrations');
    }

    /**
     * @return void
     */
    public function register()
    {
        $this->app->singleton('cdn', function($app) {
            return new \Visualplus\Cdn\Cdn;
        });
    }
}


text:
package org.jongo.marshall.jackson;

import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.PropertyName;
import com.fasterxml.jackson.databind.introspect.Annotated;
import com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector;
import org.jongo.marshall.jackson.oid.*;

@SuppressWarnings("deprecation")
public class JongoAnnotationIntrospector extends NopAnnotationIntrospector {

    private final IdSelector<Annotated> idSelector;

    public JongoAnnotationIntrospector() {
        this(new AnnotatedIdSelector());
    }

    public JongoAnnotationIntrospector(IdSelector<Annotated> idSelector) {
        this.idSelector = idSelector;
    }

    @Override
    public Include findSerializationInclusion(Annotated a, Include defValue) {
        return idSelector.isObjectId(a) ? Include.NON_NULL : defValue;
    }

    @Override
    public Object findSerializer(Annotated a) {
        return idSelector.isObjectId(a) ? ObjectIdSerializer.class : super.findSerializer(a);
    }

    @Override
    public Object findDeserializer(Annotated a) {
        return idSelector.isObjectId(a) ? ObjectIdDeserializer.class : super.findDeserializer(a);
    }

    @Override
    public PropertyName findNameForSerialization(Annotated a) {
        return idSelector.isId(a) ? new PropertyName("_id") : super.findNameForSerialization(a);
    }

    @Override
    public PropertyName findNameForDeserialization(Annotated a) {
        return idSelector.isId(a) ? new PropertyName("_id") : super.findNameForDeserialization(a);
    }

    public static class AnnotatedIdSelector implements IdSelector<Annotated> {

        public boolean isId(Annotated a) {
            return a.hasAnnotation(MongoId.class) || a.hasAnnotation(Id.class);
        }

        public boolean isObjectId(Annotated a) {
            return a.hasAnnotation(MongoObjectId.class) || a.hasAnnotation(ObjectId.class);
        }
    }
}


text:
package yuku.alkitabconverter.util;

import yuku.alkitab.util.Ari;

import java.io.PrintStream;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;

public class TextDb {
	public static final String TAG = TextDb.class.getSimpleName();

	TreeMap<Integer, VerseState> map = new TreeMap<>();

	public TextDb() {
	}

	public TextDb(final List<Rec> recs) {
		for (final Rec rec : recs) {
			final int key = Ari.encode(rec.book_1 - 1, rec.chapter_1, rec.verse_1);
			final VerseState value = new VerseState();
			value.text = rec.text;
			map.put(key, value);
		}
	}

	public interface TextProcessor {
		void process(int ari, VerseState verseState);
	}

	public static class VerseState {
		// was: "public int menjorok;" but no longer used
		public String text;
	}
	public String append(int bookId, int chapter_1, int verse_1, String s, int currentIndent) {
		return append(Ari.encode(bookId, chapter_1, verse_1), s, currentIndent);
	}

	public String append(int bookId, int chapter_1, int verse_1, String s, int currentIndent, String separatorWhenExisting) {
		return append(Ari.encode(bookId, chapter_1, verse_1), s, currentIndent, separatorWhenExisting);
	}

	/**
	 * @param currentIndent if -1, don't write anything.
	 */
	public String append(int ari, String s, int currentIndent) {
		return append(ari, s, currentIndent, null);
	}

	/**
	 * @param separatorWhenExisting if the text is appended to an ari that has already some text, append this first, then the text.
	 * @param currentIndent if -1, don't write anything.
	 */
	public String append(int ari, String text, int currentIndent, String separatorWhenExisting) {
		VerseState as = map.get(ari);
		boolean isNew = false;
		if (as == null) {
			as = new VerseState();
			as.text = "";
			map.put(ari, as);
			isNew = true;
		}

		boolean writtenParaMarker = false;

		if (currentIndent != -1) {
			if (currentIndent == -2) {
				as.text += "@^";
			} else if (currentIndent < 0 || currentIndent > 4) {
				throw new RuntimeException("menjorok ngaco: " + currentIndent);
			} else {
				as.text += "@" + String.valueOf(currentIndent);
			}

			writtenParaMarker = true;

			// was: "update menjoroknya ayatstate" but no longer used
//			for (int i = 0; i < as.isi.length(); i++) {
//				if (as.isi.charAt(i) == '@' && as.isi.charAt(i+1) >= '0' && as.isi.charAt(i+1) <= '4') {
//					as.menjorok = as.isi.charAt(i+1) - '0';
//				}
//			}
		}

		if (!isNew && separatorWhenExisting != null) {
			as.text += separatorWhenExisting;
		}

		if (writtenParaMarker) {
			as.text += leftSpaceTrim(text);
		} else {
			as.text += text;
		}

		// buang spasi di depan kalo ada
		while (as.text.startsWith(" ")) {
			as.text = as.text.substring(1);
		}

		// kasih @@ kalo depannya blum ada
		if (as.text.contains("@") && !as.text.startsWith("@@")) {
			as.text = "@@" + as.text;
		}

		return as.text;
	}

	private static String leftSpaceTrim(String s) {
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) != ' ') {
				return s.substring(i);
			}
		}
		return s;
	}

	private String dispbcv(int bookId, int chapter_1, int verse_1) {
		return "book_1 " + (bookId + 1) + " " + chapter_1 + " " + verse_1;
	}

	public void normalize() {
		Set<Integer> keys = new TreeSet<>(map.keySet());
		int last_bookId = -1;
		int last_chapter_1 = 0;
		int last_verse_1 = 0;

		for (int ari: keys) {
			int bookId = Ari.toBook(ari);
			int chapter_1 = Ari.toChapter(ari);
			int verse_1 = Ari.toVerse(ari);

			if (bookId != last_bookId) {
				// must start with chapter_1 1 and verse_1 1
				if (chapter_1 != 1 || verse_1 != 1) {
					throw new RuntimeException("at " + dispbcv(bookId, chapter_1, verse_1) + ": " + " new book does not start from 1:1");
				}
				// different book, ignore and restart
				last_bookId = bookId;
				last_chapter_1 = chapter_1;
				last_verse_1 = verse_1;
				continue;
			}

			if (chapter_1 == last_chapter_1) {
				if (verse_1 != last_verse_1 + 1) {
					System.out.println("at " + dispbcv(bookId, chapter_1, verse_1) + ": " + " skipped after " + dispbcv(last_bookId, last_chapter_1, last_verse_1));
					System.out.println("Adding empty verses:");
					for (int a = last_verse_1 + 1; a < verse_1; a++) {
						System.out.println("  at " + dispbcv(bookId, chapter_1, a) + ": " + " (blank)");
						append(bookId, chapter_1, a, "", -1);
					}
				}
			} else if (chapter_1 == last_chapter_1 + 1) {
				if (verse_1 != 1) {
					System.out.println("at " + dispbcv(bookId, chapter_1, verse_1) + ": " + " chapter does not start with verse 1");
					System.out.println("Adding empty verses:");
					for (int a = 1; a < verse_1; a++) {
						System.out.println("  at " + dispbcv(bookId, chapter_1, a) + ": " + " (blank)");
						append(bookId, chapter_1, a, "", -1);
					}
				}
			} else {
				throw new RuntimeException("at " + dispbcv(bookId, chapter_1, verse_1) + ": " + " so wrong! it's after " + last_bookId + " " + last_chapter_1 + " " + last_verse_1);
			}

			last_bookId = bookId;
			last_chapter_1 = chapter_1;
			last_verse_1 = verse_1;
		}

		System.out.println("normalize done");
	}

	public void removeEmptyVerses() {
		for (final Entry<Integer, VerseState> entry : map.entrySet()) {
			final VerseState vs = entry.getValue();
			if ("@@@0".equals(vs.text)) {
				vs.text = "";
			}
		}
	}

	public void dump(PrintStream ps) {
		ps.println("TOTAL text: " + map.size());
		for (Entry<Integer, VerseState> e: map.entrySet()) {
			ps.printf("%d\t%d\t%d\t%s%n", Ari.toBook(e.getKey()) + 1, Ari.toChapter(e.getKey()), Ari.toVerse(e.getKey()), e.getValue().text);
		}
	}

	public void dump() {
		dump(System.out);
	}

	public int size() {
		return map.size();
	}

	public List<Rec> toRecList() {
		List<Rec> res = new ArrayList<>();
		for (Entry<Integer, VerseState> e: map.entrySet()) {
			Rec rec = new Rec();
			int ari = e.getKey();
			rec.book_1 = Ari.toBook(ari) + 1;
			rec.chapter_1 = Ari.toChapter(ari);
			rec.verse_1 = Ari.toVerse(ari);
			rec.text = e.getValue().text;
			res.add(rec);
		}
		return res;
	}

	public void processEach(TextProcessor textProcessor) {
		for (Map.Entry<Integer, VerseState> e: map.entrySet()) {
			textProcessor.process(e.getKey(), e.getValue());
		}
	}

	public int getBookCount() {
		Set<Integer> bookIds = new LinkedHashSet<>();
		for (Map.Entry<Integer, VerseState> e: map.entrySet()) {
			int bookId = Ari.toBook(e.getKey());
			bookIds.add(bookId);
		}
		return bookIds.size();
	}

	public int[] getBookIds() {
		Set<Integer> bookIds = new TreeSet<>();
		for (Map.Entry<Integer, VerseState> e: map.entrySet()) {
			int bookId = Ari.toBook(e.getKey());
			bookIds.add(bookId);
		}
		int[] res = new int[bookIds.size()];
		int c = 0;
		for (Integer bookId: bookIds) {
			res[c++] = bookId;
		}
		return res;
	}

	/**
	 * No skipped chapters recognized. So if a book has chapters [1, 5, 6], this returns 6, not 3.
	 */
	public int getChapterCountForBook(int bookId) {
		int maxChapter = 0;
		for (Map.Entry<Integer, VerseState> e: map.entrySet()) {
			int ari = e.getKey();
			if (Ari.toBook(ari) == bookId) {
				int chapter_1 = Ari.toChapter(ari);
				if (chapter_1 > maxChapter) maxChapter = chapter_1;
			}
		}
		return maxChapter;
	}

	/**
	 * No skipped verses recognized. So if a chapter has verses [1, 5, 6], this returns 6, not 3.
	 */
	public int getVerseCountForBookChapter(int bookId, int chapter_1) {
		int maxVerse = 0;
		for (Map.Entry<Integer, VerseState> e: map.entrySet()) {
			int ari = e.getKey();
			if (Ari.toBook(ari) == bookId && Ari.toChapter(ari) == chapter_1) {
				int verse_1 = Ari.toVerse(ari);
				if (verse_1 > maxVerse) maxVerse = verse_1;
			}
		}
		return maxVerse;
	}

	public String getVerseText(int bookId, int chapter_1, int verse_1) {
		return map.get(Ari.encode(bookId, chapter_1, verse_1)).text;
	}
}


text:
Typesafe frames
===============


text:
module Webrat #:nodoc:
  def self.session_class #:nodoc:
    TestSession
  end

  class TestSession < Session #:nodoc:
    attr_accessor :response_body
    attr_writer :response_code

    def doc_root
      File.expand_path(File.join(".", "public"))
    end

    def response
      @response ||= Object.new
    end

    def response_code
      @response_code || 200
    end

    def get(url, data, headers = nil)
    end

    def post(url, data, headers = nil)
    end

    def put(url, data, headers = nil)
    end

    def delete(url, data, headers = nil)
    end
  end
end


text:
package com.senacor.ddt.objectmatrix;

public class KeyNotFoundException extends RuntimeException {

  public KeyNotFoundException(final String msg) {
    super(msg);
  }

}


text:
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using QRest.AspNetCore.Contracts;
using QRest.Core.Terms;
using Sprache;
using System;
using System.Collections.Generic;
using System.Linq;
using QRest.Core.Operations;
using QRest.Core.Parsing;

namespace QRest.AspNetCore.Native
{
    public class NativeSemantics : ISemantics
    {
        private static readonly NativeQueryStructure _default = new NativeQueryStructure { Data = new MethodTerm(OperationsMap.Root) };

        private readonly Lazy<Parser<ITerm>> _parser;

        private readonly NativeSemanticsOptions _opts;

        public NativeSemantics(IOptions<NativeSemanticsOptions> option = null)
        {
            _parser = new Lazy<Parser<ITerm>>(() => PrepareParser());
            _opts = option?.Value ?? new NativeSemanticsOptions();
        }

        private Parser<ITerm> PrepareParser()
        {
            var opNames = OperationsMap.GetRegisteredOperationNames()
                .Concat(_opts.CustomOperations.Keys).ToArray();

            return new TermParser(_opts.UseDefferedConstantParsing, opNames, Lookup).Build();
        }

        private IOperation Lookup(string name)
        {
            if (_opts.CustomOperations.TryGetValue(name, out var op))
                return op;

            op = OperationsMap.LookupOperation(name);
            if (op != null) return op;

            throw new InvalidSemanticsException($"Unknown operation '{name}'");
        }

        public ActionResult WriteQueryResponse(IQueryStructure query, IReadOnlyDictionary<ITerm, object> results, Type source)
        {
            var result = results[query.Data];
            return new OkObjectResult(result);
        }

        public IQueryStructure ReadQueryStructure(IReadOnlyList<string> values, HttpRequest request)
        {
            if (values.Count == 0)
                return _default;

            var result = _parser.Value.TryParse(values[0]);

            if (!result.WasSuccessful)
            {
                throw new InvalidSemanticsException(result.Message) { Position = result.Remainder.Column, Expectations = result.Expectations.ToArray() };
            }

            return new NativeQueryStructure { Data = result.Value };
        }
    }
}


text:
{% extends '_partials/base.html' %}

{% block content %}

Sign Up

    <form method="post">
        {% csrf_token %}
        {{ user_create_form.as_p }}
        <button type="submit">Sign Up</button>
    </form>
{% endblock content %}


text:
namespace biz.dfch.CS.Entity.LifeCycleManager.CumulusCoreService
{

    /// <summary>
    /// There are no comments for Core in the schema.
    /// </summary>
    public partial class Core : global::System.Data.Services.Client.DataServiceContext
    {
        /// <summary>
        /// Initialize a new Core object.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public Core(global::System.Uri serviceRoot) :
                base(serviceRoot, global::System.Data.Services.Common.DataServiceProtocolVersion.V3)
        {
            this.ResolveName = new global::System.Func<global::System.Type, string>(this.ResolveNameFromType);
            this.ResolveType = new global::System.Func<string, global::System.Type>(this.ResolveTypeFromName);
            this.OnContextCreated();
            this.Format.LoadServiceModel = GeneratedEdmModel.GetInstance;
        }
        partial void OnContextCreated();
        /// <summary>
        /// Since the namespace configured for this service reference
        /// in Visual Studio is different from the one indicated in the
        /// server schema, use type-mappers to map between the two.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected global::System.Type ResolveTypeFromName(string typeName)
        {
            global::System.Type resolvedType = this.DefaultResolveType(typeName, "biz.dfch.CS.Entity.LifeCycleManager.Model", "biz.dfch.CS.Entity.LifeCycleManager.CumulusCoreService");
            if ((resolvedType != null))
            {
                return resolvedType;
            }
            return null;
        }
        /// <summary>
        /// Since the namespace configured for this service reference
        /// in Visual Studio is different from the one indicated in the
        /// server schema, use type-mappers to map between the two.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected string ResolveNameFromType(global::System.Type clientType)
        {
            if (clientType.Namespace.Equals("biz.dfch.CS.Entity.LifeCycleManager.CumulusCoreService", global::System.StringComparison.Ordinal))
            {
                return string.Concat("biz.dfch.CS.Entity.LifeCycleManager.Model.", clientType.Name);
            }
            return null;
        }
        /// <summary>
        /// There are no comments for Jobs in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<Job> Jobs
        {
            get
            {
                if ((this._Jobs == null))
                {
                    this._Jobs = base.CreateQuery<Job>("Jobs");
                }
                return this._Jobs;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<Job> _Jobs;
        /// <summary>
        /// There are no comments for LifeCycles in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<LifeCycle> LifeCycles
        {
            get
            {
                if ((this._LifeCycles == null))
                {
                    this._LifeCycles = base.CreateQuery<LifeCycle>("LifeCycles");
                }
                return this._LifeCycles;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<LifeCycle> _LifeCycles;
        /// <summary>
        /// There are no comments for StateChangeLocks in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<StateChangeLock> StateChangeLocks
        {
            get
            {
                if ((this._StateChangeLocks == null))
                {
                    this._StateChangeLocks = base.CreateQuery<StateChangeLock>("StateChangeLocks");
                }
                return this._StateChangeLocks;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<StateChangeLock> _StateChangeLocks;
        /// <summary>
        /// There are no comments for CalloutDefinitions in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<CalloutDefinition> CalloutDefinitions
        {
            get
            {
                if ((this._CalloutDefinitions == null))
                {
                    this._CalloutDefinitions = base.CreateQuery<CalloutDefinition>("CalloutDefinitions");
                }
                return this._CalloutDefinitions;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<CalloutDefinition> _CalloutDefinitions;
        /// <summary>
        /// There are no comments for Jobs in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToJobs(Job job)
        {
            base.AddObject("Jobs", job);
        }
        /// <summary>
        /// There are no comments for LifeCycles in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToLifeCycles(LifeCycle lifeCycle)
        {
            base.AddObject("LifeCycles", lifeCycle);
        }
        /// <summary>
        /// There are no comments for StateChangeLocks in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToStateChangeLocks(StateChangeLock stateChangeLock)
        {
            base.AddObject("StateChangeLocks", stateChangeLock);
        }
        /// <summary>
        /// There are no comments for CalloutDefinitions in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToCalloutDefinitions(CalloutDefinition calloutDefinition)
        {
            base.AddObject("CalloutDefinitions", calloutDefinition);
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private abstract class GeneratedEdmModel
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            private static global::Microsoft.Data.Edm.IEdmModel ParsedModel = LoadModelFromString();
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            private const string ModelPart0 = "<edmx:Edmx Version=\"1.0\" xmlns:edmx=\"http://schemas.microsoft.com/ado/2007/06/edm" +
                "x\"><edmx:DataServices m:DataServiceVersion=\"3.0\" m:MaxDataServiceVersion=\"3.0\" x" +
                "mlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"><Schema " +
                "Namespace=\"biz.dfch.CS.Entity.LifeCycleManager.Model\" xmlns=\"http://schemas.micr" +
                "osoft.com/ado/2009/11/edm\"><EntityType Name=\"Job\"><Key><PropertyRef Name=\"Id\" />" +
                "</Key><Property Name=\"State\" Type=\"Edm.String\" Nullable=\"false\" /><Property Name" +
                "=\"Type\" Type=\"Edm.String\" Nullable=\"false\" /><Property Name=\"ReferencedItemId\" T" +
                "ype=\"Edm.String\" /><Property Name=\"Token\" Type=\"Edm.String\" /><Property Name=\"Te" +
                "nantId\" Type=\"Edm.String\" /><Property Name=\"Parameters\" Type=\"Edm.String\" /><Pro" +
                "perty Name=\"Id\" Type=\"Edm.Int32\" Nullable=\"false\" /><Property Name=\"Tid\" Type=\"E" +
                "dm.String\" /><Property Name=\"CreatedBy\" Type=\"Edm.String\" /><Property Name=\"Modi" +
                "fiedBy\" Type=\"Edm.String\" /><Property Name=\"Created\" Type=\"Edm.DateTimeOffset\" N" +
                "ullable=\"false\" /><Property Name=\"Modified\" Type=\"Edm.DateTimeOffset\" Nullable=\"" +
                "false\" /></EntityType><EntityType Name=\"LifeCycle\"><Key><PropertyRef Name=\"Id\" /" +
                "></Key><Property Name=\"Id\" Type=\"Edm.String\" Nullable=\"false\" /><Property Name=\"" +
                "Condition\" Type=\"Edm.String\" Nullable=\"false\" /></EntityType><EntityType Name=\"S" +
                "tateChangeLock\"><Key><PropertyRef Name=\"Id\" /></Key><Property Name=\"EntityId\" Ty" +
                "pe=\"Edm.String\" Nullable=\"false\" /><Property Name=\"Id\" Type=\"Edm.Int32\" Nullable" +
                "=\"false\" /><Property Name=\"Tid\" Type=\"Edm.String\" /><Property Name=\"CreatedBy\" T" +
                "ype=\"Edm.String\" /><Property Name=\"ModifiedBy\" Type=\"Edm.String\" /><Property Nam" +
                "e=\"Created\" Type=\"Edm.DateTimeOffset\" Nullable=\"false\" /><Property Name=\"Modifie" +
                "d\" Type=\"Edm.DateTimeOffset\" Nullable=\"false\" /></EntityType><EntityType Name=\"C" +
                "alloutDefinition\"><Key><PropertyRef Name=\"Id\" /></Key><Property Name=\"CalloutTyp" +
                "e\" Type=\"Edm.String\" Nullable=\"false\" /><Property Name=\"TenantId\" Type=\"Edm.Stri" +
                "ng\" Nullable=\"false\" /><Property Name=\"EntityId\" Type=\"Edm.String\" /><Property N" +
                "ame=\"EntityType\" Type=\"Edm.String\" /><Property Name=\"Condition\" Type=\"Edm.String" +
                "\" Nullable=\"false\" /><Property Name=\"Parameters\" Type=\"Edm.String\" /><Property N" +
                "ame=\"Id\" Type=\"Edm.Int32\" Nullable=\"false\" /><Property Name=\"Tid\" Type=\"Edm.Stri" +
                "ng\" /><Property Name=\"CreatedBy\" Type=\"Edm.String\" /><Property Name=\"ModifiedBy\"" +
                " Type=\"Edm.String\" /><Property Name=\"Created\" Type=\"Edm.DateTimeOffset\" Nullable" +
                "=\"false\" /><Property Name=\"Modified\" Type=\"Edm.DateTimeOffset\" Nullable=\"false\" " +
                "/></EntityType></Schema><Schema Namespace=\"Default\" xmlns=\"http://schemas.micros" +
                "oft.com/ado/2009/11/edm\"><EntityContainer Name=\"Core\" m:IsDefaultEntityContainer" +
                "=\"true\"><EntitySet Name=\"Jobs\" EntityType=\"biz.dfch.CS.Entity.LifeCycleManager.M" +
                "odel.Job\" /><EntitySet Name=\"LifeCycles\" EntityType=\"biz.dfch.CS.Entity.LifeCycl" +
                "eManager.Model.LifeCycle\" /><EntitySet Name=\"StateChangeLocks\" EntityType=\"biz.d" +
                "fch.CS.Entity.LifeCycleManager.Model.StateChangeLock\" /><EntitySet Name=\"Callout" +
                "Definitions\" EntityType=\"biz.dfch.CS.Entity.LifeCycleManager.Model.CalloutDefini" +
                "tion\" /><FunctionImport Name=\"Run\" ReturnType=\"Edm.String\" IsBindable=\"true\" m:I" +
                "sAlwaysBindable=\"true\"><Parameter Name=\"bindingParameter\" Type=\"biz.dfch.CS.Enti" +
                "ty.LifeCycleManager.Model.Job\" /></FunctionImport><FunctionImport Name=\"Finish\" " +
                "ReturnType=\"Edm.String\" IsBindable=\"true\" m:IsAlwaysBindable=\"true\"><Parameter N" +
                "ame=\"bindingParameter\" Type=\"biz.dfch.CS.Entity.LifeCycleManager.Model.Job\" /></" +
                "FunctionImport><FunctionImport Name=\"Next\" ReturnType=\"Edm.String\" IsBindable=\"t" +
                "rue\" m:IsAlwaysBindable=\"true\"><Parameter Name=\"bindingParameter\" Type=\"biz.dfch" +
                ".CS.Entity.LifeCycleManager.Model.LifeCycle\" /></FunctionImport><FunctionImport " +
                "Name=\"Cancel\" ReturnType=\"Edm.String\" IsBindable=\"true\" m:IsAlwaysBindable=\"true" +
                "\"><Parameter Name=\"bindingParameter\" Type=\"biz.dfch.CS.Entity.LifeCycleManager.M" +
                "odel.LifeCycle\" /></FunctionImport><FunctionImport Name=\"Allow\" ReturnType=\"Edm." +
                "String\" IsBindable=\"true\" m:IsAlwaysBindable=\"true\"><Parameter Name=\"bindingPara" +
                "meter\" Type=\"biz.dfch.CS.Entity.LifeCycleManager.Model.LifeCycle\" /></FunctionIm" +
                "port><FunctionImport Name=\"Decline\" ReturnType=\"Edm.String\" IsBindable=\"true\" m:" +
                "IsAlwaysBindable=\"true\"><Parameter Name=\"bindingParameter\" Type=\"biz.dfch.CS.Ent" +
                "ity.LifeCycleManager.Model.LifeCycle\" /></FunctionImport></EntityContainer></Sch" +
                "ema></edmx:DataServices></edmx:Edmx>";
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            private static string GetConcatenatedEdmxString()
            {
                return string.Concat(ModelPart0);
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            public static global::Microsoft.Data.Edm.IEdmModel GetInstance()
            {
                return ParsedModel;
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            private static global::Microsoft.Data.Edm.IEdmModel LoadModelFromString()
            {
                string edmxToParse = GetConcatenatedEdmxString();
                global::System.Xml.XmlReader reader = CreateXmlReader(edmxToParse);
                try
                {
                    return global::Microsoft.Data.Edm.Csdl.EdmxReader.Parse(reader);
                }
                finally
                {
                    ((global::System.IDisposable)(reader)).Dispose();
                }
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            private static global::System.Xml.XmlReader CreateXmlReader(string edmxToParse)
            {
                return global::System.Xml.XmlReader.Create(new global::System.IO.StringReader(edmxToParse));
            }
        }
    }
    /// <summary>
    /// There are no comments for biz.dfch.CS.Entity.LifeCycleManager.Model.Job in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("Jobs")]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")]
    public partial class Job : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new Job object.
        /// </summary>
        /// <param name="state">Initial value of State.</param>
        /// <param name="type">Initial value of Type.</param>
        /// <param name="ID">Initial value of Id.</param>
        /// <param name="created">Initial value of Created.</param>
        /// <param name="modified">Initial value of Modified.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static Job CreateJob(string state, string type, int ID, global::System.DateTimeOffset created, global::System.DateTimeOffset modified)
        {
            Job job = new Job();
            job.State = state;
            job.Type = type;
            job.Id = ID;
            job.Created = created;
            job.Modified = modified;
            return job;
        }
        /// <summary>
        /// There are no comments for Property State in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string State
        {
            get
            {
                return this._State;
            }
            set
            {
                this.OnStateChanging(value);
                this._State = value;
                this.OnStateChanged();
                this.OnPropertyChanged("State");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _State;
        partial void OnStateChanging(string value);
        partial void OnStateChanged();
        /// <summary>
        /// There are no comments for Property Type in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Type
        {
            get
            {
                return this._Type;
            }
            set
            {
                this.OnTypeChanging(value);
                this._Type = value;
                this.OnTypeChanged();
                this.OnPropertyChanged("Type");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Type;
        partial void OnTypeChanging(string value);
        partial void OnTypeChanged();
        /// <summary>
        /// There are no comments for Property ReferencedItemId in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string ReferencedItemId
        {
            get
            {
                return this._ReferencedItemId;
            }
            set
            {
                this.OnReferencedItemIdChanging(value);
                this._ReferencedItemId = value;
                this.OnReferencedItemIdChanged();
                this.OnPropertyChanged("ReferencedItemId");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _ReferencedItemId;
        partial void OnReferencedItemIdChanging(string value);
        partial void OnReferencedItemIdChanged();
        /// <summary>
        /// There are no comments for Property Token in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Token
        {
            get
            {
                return this._Token;
            }
            set
            {
                this.OnTokenChanging(value);
                this._Token = value;
                this.OnTokenChanged();
                this.OnPropertyChanged("Token");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Token;
        partial void OnTokenChanging(string value);
        partial void OnTokenChanged();
        /// <summary>
        /// There are no comments for Property TenantId in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string TenantId
        {
            get
            {
                return this._TenantId;
            }
            set
            {
                this.OnTenantIdChanging(value);
                this._TenantId = value;
                this.OnTenantIdChanged();
                this.OnPropertyChanged("TenantId");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _TenantId;
        partial void OnTenantIdChanging(string value);
        partial void OnTenantIdChanged();
        /// <summary>
        /// There are no comments for Property Parameters in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Parameters
        {
            get
            {
                return this._Parameters;
            }
            set
            {
                this.OnParametersChanging(value);
                this._Parameters = value;
                this.OnParametersChanged();
                this.OnPropertyChanged("Parameters");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Parameters;
        partial void OnParametersChanging(string value);
        partial void OnParametersChanged();
        /// <summary>
        /// There are no comments for Property Id in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this.OnIdChanging(value);
                this._Id = value;
                this.OnIdChanged();
                this.OnPropertyChanged("Id");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _Id;
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
        /// <summary>
        /// There are no comments for Property Tid in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Tid
        {
            get
            {
                return this._Tid;
            }
            set
            {
                this.OnTidChanging(value);
                this._Tid = value;
                this.OnTidChanged();
                this.OnPropertyChanged("Tid");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Tid;
        partial void OnTidChanging(string value);
        partial void OnTidChanged();
        /// <summary>
        /// There are no comments for Property CreatedBy in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string CreatedBy
        {
            get
            {
                return this._CreatedBy;
            }
            set
            {
                this.OnCreatedByChanging(value);
                this._CreatedBy = value;
                this.OnCreatedByChanged();
                this.OnPropertyChanged("CreatedBy");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _CreatedBy;
        partial void OnCreatedByChanging(string value);
        partial void OnCreatedByChanged();
        /// <summary>
        /// There are no comments for Property ModifiedBy in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string ModifiedBy
        {
            get
            {
                return this._ModifiedBy;
            }
            set
            {
                this.OnModifiedByChanging(value);
                this._ModifiedBy = value;
                this.OnModifiedByChanged();
                this.OnPropertyChanged("ModifiedBy");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _ModifiedBy;
        partial void OnModifiedByChanging(string value);
        partial void OnModifiedByChanged();
        /// <summary>
        /// There are no comments for Property Created in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTimeOffset Created
        {
            get
            {
                return this._Created;
            }
            set
            {
                this.OnCreatedChanging(value);
                this._Created = value;
                this.OnCreatedChanged();
                this.OnPropertyChanged("Created");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTimeOffset _Created;
        partial void OnCreatedChanging(global::System.DateTimeOffset value);
        partial void OnCreatedChanged();
        /// <summary>
        /// There are no comments for Property Modified in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTimeOffset Modified
        {
            get
            {
                return this._Modified;
            }
            set
            {
                this.OnModifiedChanging(value);
                this._Modified = value;
                this.OnModifiedChanged();
                this.OnPropertyChanged("Modified");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTimeOffset _Modified;
        partial void OnModifiedChanging(global::System.DateTimeOffset value);
        partial void OnModifiedChanged();
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for biz.dfch.CS.Entity.LifeCycleManager.Model.LifeCycle in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("LifeCycles")]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")]
    public partial class LifeCycle : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new LifeCycle object.
        /// </summary>
        /// <param name="ID">Initial value of Id.</param>
        /// <param name="condition">Initial value of Condition.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static LifeCycle CreateLifeCycle(string ID, string condition)
        {
            LifeCycle lifeCycle = new LifeCycle();
            lifeCycle.Id = ID;
            lifeCycle.Condition = condition;
            return lifeCycle;
        }
        /// <summary>
        /// There are no comments for Property Id in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this.OnIdChanging(value);
                this._Id = value;
                this.OnIdChanged();
                this.OnPropertyChanged("Id");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Id;
        partial void OnIdChanging(string value);
        partial void OnIdChanged();
        /// <summary>
        /// There are no comments for Property Condition in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Condition
        {
            get
            {
                return this._Condition;
            }
            set
            {
                this.OnConditionChanging(value);
                this._Condition = value;
                this.OnConditionChanged();
                this.OnPropertyChanged("Condition");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Condition;
        partial void OnConditionChanging(string value);
        partial void OnConditionChanged();
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for biz.dfch.CS.Entity.LifeCycleManager.Model.StateChangeLock in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("StateChangeLocks")]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")]
    public partial class StateChangeLock : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new StateChangeLock object.
        /// </summary>
        /// <param name="entityId">Initial value of EntityId.</param>
        /// <param name="ID">Initial value of Id.</param>
        /// <param name="created">Initial value of Created.</param>
        /// <param name="modified">Initial value of Modified.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static StateChangeLock CreateStateChangeLock(string entityId, int ID, global::System.DateTimeOffset created, global::System.DateTimeOffset modified)
        {
            StateChangeLock stateChangeLock = new StateChangeLock();
            stateChangeLock.EntityId = entityId;
            stateChangeLock.Id = ID;
            stateChangeLock.Created = created;
            stateChangeLock.Modified = modified;
            return stateChangeLock;
        }
        /// <summary>
        /// There are no comments for Property EntityId in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string EntityId
        {
            get
            {
                return this._EntityId;
            }
            set
            {
                this.OnEntityIdChanging(value);
                this._EntityId = value;
                this.OnEntityIdChanged();
                this.OnPropertyChanged("EntityId");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _EntityId;
        partial void OnEntityIdChanging(string value);
        partial void OnEntityIdChanged();
        /// <summary>
        /// There are no comments for Property Id in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this.OnIdChanging(value);
                this._Id = value;
                this.OnIdChanged();
                this.OnPropertyChanged("Id");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _Id;
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
        /// <summary>
        /// There are no comments for Property Tid in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Tid
        {
            get
            {
                return this._Tid;
            }
            set
            {
                this.OnTidChanging(value);
                this._Tid = value;
                this.OnTidChanged();
                this.OnPropertyChanged("Tid");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Tid;
        partial void OnTidChanging(string value);
        partial void OnTidChanged();
        /// <summary>
        /// There are no comments for Property CreatedBy in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string CreatedBy
        {
            get
            {
                return this._CreatedBy;
            }
            set
            {
                this.OnCreatedByChanging(value);
                this._CreatedBy = value;
                this.OnCreatedByChanged();
                this.OnPropertyChanged("CreatedBy");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _CreatedBy;
        partial void OnCreatedByChanging(string value);
        partial void OnCreatedByChanged();
        /// <summary>
        /// There are no comments for Property ModifiedBy in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string ModifiedBy
        {
            get
            {
                return this._ModifiedBy;
            }
            set
            {
                this.OnModifiedByChanging(value);
                this._ModifiedBy = value;
                this.OnModifiedByChanged();
                this.OnPropertyChanged("ModifiedBy");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _ModifiedBy;
        partial void OnModifiedByChanging(string value);
        partial void OnModifiedByChanged();
        /// <summary>
        /// There are no comments for Property Created in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTimeOffset Created
        {
            get
            {
                return this._Created;
            }
            set
            {
                this.OnCreatedChanging(value);
                this._Created = value;
                this.OnCreatedChanged();
                this.OnPropertyChanged("Created");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTimeOffset _Created;
        partial void OnCreatedChanging(global::System.DateTimeOffset value);
        partial void OnCreatedChanged();
        /// <summary>
        /// There are no comments for Property Modified in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTimeOffset Modified
        {
            get
            {
                return this._Modified;
            }
            set
            {
                this.OnModifiedChanging(value);
                this._Modified = value;
                this.OnModifiedChanged();
                this.OnPropertyChanged("Modified");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTimeOffset _Modified;
        partial void OnModifiedChanging(global::System.DateTimeOffset value);
        partial void OnModifiedChanged();
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for biz.dfch.CS.Entity.LifeCycleManager.Model.CalloutDefinition in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("CalloutDefinitions")]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")]
    public partial class CalloutDefinition : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new CalloutDefinition object.
        /// </summary>
        /// <param name="calloutType">Initial value of CalloutType.</param>
        /// <param name="tenantId">Initial value of TenantId.</param>
        /// <param name="condition">Initial value of Condition.</param>
        /// <param name="ID">Initial value of Id.</param>
        /// <param name="created">Initial value of Created.</param>
        /// <param name="modified">Initial value of Modified.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static CalloutDefinition CreateCalloutDefinition(string calloutType, string tenantId, string condition, int ID, global::System.DateTimeOffset created, global::System.DateTimeOffset modified)
        {
            CalloutDefinition calloutDefinition = new CalloutDefinition();
            calloutDefinition.CalloutType = calloutType;
            calloutDefinition.TenantId = tenantId;
            calloutDefinition.Condition = condition;
            calloutDefinition.Id = ID;
            calloutDefinition.Created = created;
            calloutDefinition.Modified = modified;
            return calloutDefinition;
        }
        /// <summary>
        /// There are no comments for Property CalloutType in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string CalloutType
        {
            get
            {
                return this._CalloutType;
            }
            set
            {
                this.OnCalloutTypeChanging(value);
                this._CalloutType = value;
                this.OnCalloutTypeChanged();
                this.OnPropertyChanged("CalloutType");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _CalloutType;
        partial void OnCalloutTypeChanging(string value);
        partial void OnCalloutTypeChanged();
        /// <summary>
        /// There are no comments for Property TenantId in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string TenantId
        {
            get
            {
                return this._TenantId;
            }
            set
            {
                this.OnTenantIdChanging(value);
                this._TenantId = value;
                this.OnTenantIdChanged();
                this.OnPropertyChanged("TenantId");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _TenantId;
        partial void OnTenantIdChanging(string value);
        partial void OnTenantIdChanged();
        /// <summary>
        /// There are no comments for Property EntityId in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string EntityId
        {
            get
            {
                return this._EntityId;
            }
            set
            {
                this.OnEntityIdChanging(value);
                this._EntityId = value;
                this.OnEntityIdChanged();
                this.OnPropertyChanged("EntityId");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _EntityId;
        partial void OnEntityIdChanging(string value);
        partial void OnEntityIdChanged();
        /// <summary>
        /// There are no comments for Property EntityType in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string EntityType
        {
            get
            {
                return this._EntityType;
            }
            set
            {
                this.OnEntityTypeChanging(value);
                this._EntityType = value;
                this.OnEntityTypeChanged();
                this.OnPropertyChanged("EntityType");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _EntityType;
        partial void OnEntityTypeChanging(string value);
        partial void OnEntityTypeChanged();
        /// <summary>
        /// There are no comments for Property Condition in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Condition
        {
            get
            {
                return this._Condition;
            }
            set
            {
                this.OnConditionChanging(value);
                this._Condition = value;
                this.OnConditionChanged();
                this.OnPropertyChanged("Condition");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Condition;
        partial void OnConditionChanging(string value);
        partial void OnConditionChanged();
        /// <summary>
        /// There are no comments for Property Parameters in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Parameters
        {
            get
            {
                return this._Parameters;
            }
            set
            {
                this.OnParametersChanging(value);
                this._Parameters = value;
                this.OnParametersChanged();
                this.OnPropertyChanged("Parameters");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Parameters;
        partial void OnParametersChanging(string value);
        partial void OnParametersChanged();
        /// <summary>
        /// There are no comments for Property Id in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this.OnIdChanging(value);
                this._Id = value;
                this.OnIdChanged();
                this.OnPropertyChanged("Id");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _Id;
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
        /// <summary>
        /// There are no comments for Property Tid in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Tid
        {
            get
            {
                return this._Tid;
            }
            set
            {
                this.OnTidChanging(value);
                this._Tid = value;
                this.OnTidChanged();
                this.OnPropertyChanged("Tid");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Tid;
        partial void OnTidChanging(string value);
        partial void OnTidChanged();
        /// <summary>
        /// There are no comments for Property CreatedBy in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string CreatedBy
        {
            get
            {
                return this._CreatedBy;
            }
            set
            {
                this.OnCreatedByChanging(value);
                this._CreatedBy = value;
                this.OnCreatedByChanged();
                this.OnPropertyChanged("CreatedBy");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _CreatedBy;
        partial void OnCreatedByChanging(string value);
        partial void OnCreatedByChanged();
        /// <summary>
        /// There are no comments for Property ModifiedBy in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string ModifiedBy
        {
            get
            {
                return this._ModifiedBy;
            }
            set
            {
                this.OnModifiedByChanging(value);
                this._ModifiedBy = value;
                this.OnModifiedByChanged();
                this.OnPropertyChanged("ModifiedBy");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _ModifiedBy;
        partial void OnModifiedByChanging(string value);
        partial void OnModifiedByChanged();
        /// <summary>
        /// There are no comments for Property Created in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTimeOffset Created
        {
            get
            {
                return this._Created;
            }
            set
            {
                this.OnCreatedChanging(value);
                this._Created = value;
                this.OnCreatedChanged();
                this.OnPropertyChanged("Created");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTimeOffset _Created;
        partial void OnCreatedChanging(global::System.DateTimeOffset value);
        partial void OnCreatedChanged();
        /// <summary>
        /// There are no comments for Property Modified in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTimeOffset Modified
        {
            get
            {
                return this._Modified;
            }
            set
            {
                this.OnModifiedChanging(value);
                this._Modified = value;
                this.OnModifiedChanged();
                this.OnPropertyChanged("Modified");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTimeOffset _Modified;
        partial void OnModifiedChanging(global::System.DateTimeOffset value);
        partial void OnModifiedChanged();
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
}


text:
System.register([], function(exports_1) {
    return {
        setters:[],
        execute: function() {
        }
    }
});
//# sourceMappingURL=data.js.map


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Immutable;
using System.ComponentModel;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.FindSymbols.Finders;
using Microsoft.CodeAnalysis.MetadataAsSource;
using Microsoft.CodeAnalysis.Navigation;
using Microsoft.CodeAnalysis.Tags;
using Roslyn.Utilities;

namespace Microsoft.CodeAnalysis.FindUsages
{
    /// <summary>
    /// Information about a symbol's definition that can be displayed in an editor
    /// and used for navigation.
    ///
    /// Standard implmentations can be obtained through the various <see cref="DefinitionItem"/>.Create
    /// overloads.
    ///
    /// Subclassing is also supported for scenarios that fall outside the bounds of
    /// these common cases.
    /// </summary>
    internal abstract partial class DefinitionItem
    {
        /// <summary>
        /// The definition item corresponding to the initial symbol the user was trying to find. This item should get
        /// prominent placement in the final UI for the user.
        /// </summary>
        internal const string Primary = nameof(Primary);

        // Existing behavior is to do up to two lookups for 3rd party navigation for FAR.  One
        // for the symbol itself and one for a 'fallback' symbol.  For example, if we're FARing
        // on a constructor, then the fallback symbol will be the actual type that the constructor
        // is contained within.
        internal const string RQNameKey1 = nameof(RQNameKey1);
        internal const string RQNameKey2 = nameof(RQNameKey2);

        /// <summary>
        /// For metadata symbols we encode information in the <see cref="Properties"/> so we can
        /// retrieve the symbol later on when navigating.  This is needed so that we can go to
        /// metadata-as-source for metadata symbols.  We need to store the <see cref="SymbolKey"/>
        /// for the symbol and the project ID that originated the symbol.  With these we can correctly recover the symbol.
        /// </summary>
        private const string MetadataSymbolKey = nameof(MetadataSymbolKey);
        private const string MetadataSymbolOriginatingProjectIdGuid = nameof(MetadataSymbolOriginatingProjectIdGuid);
        private const string MetadataSymbolOriginatingProjectIdDebugName = nameof(MetadataSymbolOriginatingProjectIdDebugName);

        /// <summary>
        /// If this item is something that cannot be navigated to.  We store this in our
        /// <see cref="Properties"/> to act as an explicit marker that navigation is not possible.
        /// </summary>
        private const string NonNavigable = nameof(NonNavigable);

        /// <summary>
        /// Descriptive tags from <see cref="WellKnownTags"/>. These tags may influence how the
        /// item is displayed.
        /// </summary>
        public ImmutableArray<string> Tags { get; }

        /// <summary>
        /// Additional properties that can be attached to the definition for clients that want to
        /// keep track of additional data.
        /// </summary>
        public ImmutableDictionary<string, string> Properties { get; }

        /// <summary>
        /// Additional diplayable properties that can be attached to the definition for clients that want to
        /// display additional data.
        /// </summary>
        public ImmutableDictionary<string, string> DisplayableProperties { get; }

        /// <summary>
        /// The DisplayParts just for the name of this definition.  Generally used only for
        /// error messages.
        /// </summary>
        public ImmutableArray<TaggedText> NameDisplayParts { get; }

        /// <summary>
        /// The full display parts for this definition.  Displayed in a classified
        /// manner when possible.
        /// </summary>
        public ImmutableArray<TaggedText> DisplayParts { get; }

        /// <summary>
        /// Where the location originally came from (for example, the containing assembly or
        /// project name).  May be used in the presentation of a definition.
        /// </summary>
        public ImmutableArray<TaggedText> OriginationParts { get; }

        /// <summary>
        /// Additional locations to present in the UI.  A definition may have multiple locations
        /// for cases like partial types/members.
        /// </summary>
        public ImmutableArray<DocumentSpan> SourceSpans { get; }

        /// <summary>
        /// Whether or not this definition should be presented if we never found any references to
        /// it.  For example, when searching for a property, the FindReferences engine will cascade
        /// to the accessors in case any code specifically called those accessors (can happen in
        /// cross-language cases).  However, in the normal case where there were no calls specifically
        /// to the accessor, we would not want to display them in the UI.
        ///
        /// For most definitions we will want to display them, even if no references were found.
        /// This property allows for this customization in behavior.
        /// </summary>
        public bool DisplayIfNoReferences { get; }

        internal abstract bool IsExternal { get; }

        // F# uses this
        protected DefinitionItem(
            ImmutableArray<string> tags,
            ImmutableArray<TaggedText> displayParts,
            ImmutableArray<TaggedText> nameDisplayParts,
            ImmutableArray<TaggedText> originationParts,
            ImmutableArray<DocumentSpan> sourceSpans,
            ImmutableDictionary<string, string>? properties,
            bool displayIfNoReferences)
            : this(
                tags,
                displayParts,
                nameDisplayParts,
                originationParts,
                sourceSpans,
                properties,
                ImmutableDictionary<string, string>.Empty,
                displayIfNoReferences)
        {
        }

        protected DefinitionItem(
            ImmutableArray<string> tags,
            ImmutableArray<TaggedText> displayParts,
            ImmutableArray<TaggedText> nameDisplayParts,
            ImmutableArray<TaggedText> originationParts,
            ImmutableArray<DocumentSpan> sourceSpans,
            ImmutableDictionary<string, string>? properties,
            ImmutableDictionary<string, string>? displayableProperties,
            bool displayIfNoReferences)
        {
            Tags = tags;
            DisplayParts = displayParts;
            NameDisplayParts = nameDisplayParts.IsDefaultOrEmpty ? displayParts : nameDisplayParts;
            OriginationParts = originationParts.NullToEmpty();
            SourceSpans = sourceSpans.NullToEmpty();
            Properties = properties ?? ImmutableDictionary<string, string>.Empty;
            DisplayableProperties = displayableProperties ?? ImmutableDictionary<string, string>.Empty;
            DisplayIfNoReferences = displayIfNoReferences;

            if (Properties.ContainsKey(MetadataSymbolKey))
            {
                Contract.ThrowIfFalse(Properties.ContainsKey(MetadataSymbolOriginatingProjectIdGuid));
                Contract.ThrowIfFalse(Properties.ContainsKey(MetadataSymbolOriginatingProjectIdDebugName));
            }
        }

        [Obsolete("Use GetNavigableLocationAsync instead")]
        public Task<bool> TryNavigateToAsync(Workspace workspace, bool showInPreviewTab, bool activateTab, CancellationToken cancellationToken)
            => TryNavigateToAsync(workspace, new NavigationOptions(showInPreviewTab, activateTab), cancellationToken);

        [Obsolete("Use GetNavigableLocationAsync instead")]
        public async Task<bool> TryNavigateToAsync(Workspace workspace, NavigationOptions options, CancellationToken cancellationToken)
        {
            var location = await GetNavigableLocationAsync(workspace, cancellationToken).ConfigureAwait(false);
            return location != null &&
                await location.NavigateToAsync(options, cancellationToken).ConfigureAwait(false);
        }

        public abstract Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken);

        public static DefinitionItem Create(
            ImmutableArray<string> tags,
            ImmutableArray<TaggedText> displayParts,
            DocumentSpan sourceSpan,
            ImmutableArray<TaggedText> nameDisplayParts = default,
            bool displayIfNoReferences = true)
        {
            return Create(
                tags, displayParts, ImmutableArray.Create(sourceSpan),
                nameDisplayParts, displayIfNoReferences);
        }

        // Kept around for binary compat with F#/TypeScript.
        public static DefinitionItem Create(
            ImmutableArray<string> tags,
            ImmutableArray<TaggedText> displayParts,
            ImmutableArray<DocumentSpan> sourceSpans,
            ImmutableArray<TaggedText> nameDisplayParts,
            bool displayIfNoReferences)
        {
            return Create(
                tags, displayParts, sourceSpans, nameDisplayParts,
                properties: null, displayableProperties: ImmutableDictionary<string, string>.Empty, displayIfNoReferences: displayIfNoReferences);
        }

        public static DefinitionItem Create(
            ImmutableArray<string> tags,
            ImmutableArray<TaggedText> displayParts,
            ImmutableArray<DocumentSpan> sourceSpans,
            ImmutableArray<TaggedText> nameDisplayParts = default,
            ImmutableDictionary<string, string>? properties = null,
            bool displayIfNoReferences = true)
        {
            return Create(tags, displayParts, sourceSpans, nameDisplayParts, properties, ImmutableDictionary<string, string>.Empty, displayIfNoReferences);
        }

        public static DefinitionItem Create(
            ImmutableArray<string> tags,
            ImmutableArray<TaggedText> displayParts,
            ImmutableArray<DocumentSpan> sourceSpans,
            ImmutableArray<TaggedText> nameDisplayParts = default,
            ImmutableDictionary<string, string>? properties = null,
            ImmutableDictionary<string, string>? displayableProperties = null,
            bool displayIfNoReferences = true)
        {
            if (sourceSpans.Length == 0)
            {
                throw new ArgumentException($"{nameof(sourceSpans)} cannot be empty.");
            }

            var firstDocument = sourceSpans[0].Document;
            var originationParts = ImmutableArray.Create(
                new TaggedText(TextTags.Text, firstDocument.Project.Name));

            return new DefaultDefinitionItem(
                tags, displayParts, nameDisplayParts, originationParts,
                sourceSpans, properties, displayableProperties, displayIfNoReferences);
        }

        internal static DefinitionItem CreateMetadataDefinition(
            ImmutableArray<string> tags,
            ImmutableArray<TaggedText> displayParts,
            ImmutableArray<TaggedText> nameDisplayParts,
            Solution solution,
            ISymbol symbol,
            ImmutableDictionary<string, string>? properties = null,
            bool displayIfNoReferences = true)
        {
            properties ??= ImmutableDictionary<string, string>.Empty;

            var symbolKey = symbol.GetSymbolKey().ToString();

            var projectId = solution.GetOriginatingProjectId(symbol);
            Contract.ThrowIfNull(projectId);

            properties = properties
                .Add(MetadataSymbolKey, symbolKey)
                .Add(MetadataSymbolOriginatingProjectIdGuid, projectId.Id.ToString())
                .Add(MetadataSymbolOriginatingProjectIdDebugName, projectId.DebugName ?? "");

            // Find the highest level containing type to show as the "file name". For metadata locations
            // that come from embedded source or SourceLink this could be wrong, as there is no reason
            // to assume a type is defined in a filename that matches, but its _way_ too expensive
            // to try to find the right answer. For metadata-as-source locations though, it will be the same
            // as the synthesized filename, so will make sense in the majority of cases.
            var containingTypeName = MetadataAsSourceHelpers.GetTopLevelContainingNamedType(symbol).Name;
            properties = properties.Add(AbstractReferenceFinder.ContainingTypeInfoPropertyName, containingTypeName);

            var originationParts = GetOriginationParts(symbol);
            return new DefaultDefinitionItem(
                tags, displayParts, nameDisplayParts, originationParts,
                sourceSpans: ImmutableArray<DocumentSpan>.Empty,
                properties: properties,
                displayableProperties: ImmutableDictionary<string, string>.Empty,
                displayIfNoReferences: displayIfNoReferences);
        }

        // Kept around for binary compat with F#/TypeScript.
        public static DefinitionItem CreateNonNavigableItem(
            ImmutableArray<string> tags,
            ImmutableArray<TaggedText> displayParts,
            ImmutableArray<TaggedText> originationParts,
            bool displayIfNoReferences)
        {
            return CreateNonNavigableItem(
                tags, displayParts, originationParts,
                properties: null, displayIfNoReferences: displayIfNoReferences);
        }

        public static DefinitionItem CreateNonNavigableItem(
            ImmutableArray<string> tags,
            ImmutableArray<TaggedText> displayParts,
            ImmutableArray<TaggedText> originationParts = default,
            ImmutableDictionary<string, string>? properties = null,
            bool displayIfNoReferences = true)
        {
            properties ??= ImmutableDictionary<string, string>.Empty;
            properties = properties.Add(NonNavigable, "");

            return new DefaultDefinitionItem(
                tags: tags,
                displayParts: displayParts,
                nameDisplayParts: ImmutableArray<TaggedText>.Empty,
                originationParts: originationParts,
                sourceSpans: ImmutableArray<DocumentSpan>.Empty,
                properties: properties,
                displayableProperties: ImmutableDictionary<string, string>.Empty,
                displayIfNoReferences: displayIfNoReferences);
        }

        internal static ImmutableArray<TaggedText> GetOriginationParts(ISymbol symbol)
        {
            // We don't show an origination location for a namespace because it can span over
            // both metadata assemblies and source projects.
            //
            // Otherwise show the assembly this symbol came from as the Origination of
            // the DefinitionItem.
            if (symbol.Kind != SymbolKind.Namespace)
            {
                var assemblyName = symbol.ContainingAssembly?.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat);
                if (!string.IsNullOrWhiteSpace(assemblyName))
                {
                    return ImmutableArray.Create(new TaggedText(TextTags.Assembly, assemblyName));
                }
            }

            return ImmutableArray<TaggedText>.Empty;
        }

        public DetachedDefinitionItem Detach()
            => new(Tags, DisplayParts, NameDisplayParts, OriginationParts, SourceSpans.SelectAsArray(ss => (DocumentIdSpan)ss), Properties, DisplayableProperties, DisplayIfNoReferences);
    }
}


text:
import * as AST from "./ast";
import {ParserNode} from "./peg_grammar";

class CommandNameMaker extends AST.BaseVisitor {
    visitBareWord(bare: AST.BareWord) { return bare.bare; }
    visitExpression() { return "$"; }
    visitRef() { return "$"; }
    visitLiteral() { return "$"; }
    visitCommand() { return "$"; }
    visitHangingCall() { return "$"; }
    visitBinOpNode() { return "$"; }
}

class CommandCallMaker {
    public parts: AST.Visitable[];

    constructor() {
        this.parts = [];
    }

    addPart(part: AST.Visitable) {
        this.parts.push(part);
    }

    build(): { name: string; args: AST.CommandArg[] } {
        var args: AST.CommandArg[] = [],
            name = this.parts.map((p) => {
                var result = <string>p.accept(new CommandNameMaker());
                if (result === "$") { args.push(new AST.CommandArg(p)); }
                return result;
            }).join(" ");
        return { name: name, args: args };
    }
}

// LineCollector collects lines based on indentation into
// Syntax.CompoundExpression instances. As it does this,
// hanging calls have their body property set to a CompoundExpression
// of the lines in their body.
//
// Eg.
// wow:
//   this is cool
//   yeah neat
//
// will go from
// CompoundExpression
//   HangingCall
//   CommandCall
//   CommandCall
//
// to
// CompoundExpression
//   HangingCall
//     CompoundExpression
//       CommandCall
//       CommandCall
//
// LineCollector works by going through the lines of a compound expression
// using the visitor pattern to recognize hanging calls. If a hanging call
// is found, it makes a new LineCollector to collect lines for that call.
//
// Useful insight: the stack of LineCollectors creating each other will
// mirror the call stack of the program when it is run.
export class Line {
    constructor(public indent: number, public expression: AST.Visitable) {
    }

    isEmpty(): boolean {
        return this.expression == null;
    }

    accept(v: AST.Visitor) {
        if (this.expression) {
            return this.expression.accept(v);
        }
        return null;
    }

    static makeError(): Line {
        return new Line(0, new AST.SyntaxError());
    }
}

export type ParseResult = ParserNode<AST.Visitable>|AST.Visitable;

export module grammarActions {
    export function makeLine(input: string, start: number, end: number, elements: ParseResult[]) {
        let [indent, expression] = elements;

        // empty lines do not have an expression, so it stays as a canopy thing
        if ('elements' in expression) {
            return new Line(0, null);
        }
        return new Line((indent as ParserNode<any>).text.length, expression as AST.Visitable);
    }

    export function makeBool(input: string, start: number, end: number, elements: ParseResult[]) {
        if (input[start] == "t") {
            return new AST.Literal(true);
        }
        return new AST.Literal(false);
    }

    export function makeNumber(input: string, start: number, end: number, elements: AST.Visitable[]) {
        return new AST.Literal(Number(input.substring(start, end)));
    }

    export function makeString(input: string, start: number, end: number, elements: AST.Visitable[]) {
        // +-1 for quotes
        return new AST.Literal(input.substring(start + 1, end - 1));
    }

    export function makeParenNode(input: string, start: number, end: number, elements: AST.Visitable[]) {
        return elements[2]; // skip ( and spaces
    }

    export function makeBinOpNode(input: string, start: number, end: number, elements: ParseResult[]) {
        let ls = elements[0] as AST.Visitable;
        let parts = elements[1] as ParserNode<any>;

        let rs = parts.elements.map((p) => makeBinOp(p.op.text, p.rs));
        return new AST.BinOpNode(ls, rs);
    }

    const BIN_OPS = {
        '+': AST.AddOp,
        '-': AST.SubOp,
        '/': AST.DivideOp,
        '*': AST.MultOp
    };

    export function makeBinOp(op: string, rs: AST.Visitable) {
        return new (BIN_OPS[op])(rs);
    }

    const BOOL_OPS = {
        '|': AST.OrOp,
        '&': AST.AndOp
    };

    export function makeBoolNode(input: string, start: number, end: number, elements: any[]) {
        let initialNot = elements[0];
        let ls = elements[1] as AST.Visitable;
        let parts = elements[2].elements;

        let negateFirst = initialNot.text != "";
        var rights = parts.map((v) => {
            let not = v.not.text != "";
            return new (BOOL_OPS[v.op.text])(not, v.rs);
        });

        let left = ls;
        if (negateFirst) {
            left = new AST.NotOp(ls);
        }

        return new AST.BinOpNode(left, rights);
    }

    export function makeRef(input: string, start: number, end: number, elements: ParserNode<any>[]) {
        return new AST.Ref(elements[1].text);
    }

    export function makeBare(input: string, start: number, end: number, elements: AST.Visitable[]) {
        return new AST.BareWord(input.substring(start, end));
    }

    export function makeCommandArg(input: string, start: number, end: number, elements: any[]) {
        return elements[1]; // ignore SPACE
    }

    export function makeCommandCall(input: string, start: number, end: number, elements: any[]) {
        let builder = new CommandCallMaker();

        let first = elements[0];
        let parts = elements[1].elements as AST.Visitable[];
        let colon = elements[2] as any;

        if (first instanceof AST.ASTItem) {
            builder.addPart(first); // bare word
        } else {
            builder.addPart(first.ref);
            builder.addPart(first.bare); // bare word
        }

        parts.map((e) => {
            builder.addPart(e);
        });

        let callParts = builder.build();
        if (colon.elements.length > 0) {
            return new AST.HangingCall(callParts.name + ' :', callParts.args);
        }
        return new AST.CommandCall(callParts.name, callParts.args);
    }
}


text:
<?php

namespace vg\wordpress_plugin\util;

class Util
{
    /**
     * Translates a camel case string into a string with
     * underscores (e.g. firstName -> first_name)
     *
     * @param string $str String in camel case format
     * @return string $str Translated into underscore format
     */
    public static function from_camel_case($str)
    {
        $str[0] = strtolower($str[0]);
        $func = create_function('$c', 'return "_" . strtolower($c[1]);');
        return preg_replace_callback('/([A-Z])/', $func, $str);
    }

    /**
     * Translates a string with underscores
     * into camel case (e.g. first_name -> firstName)
     *
     * @param string $str String in underscore format
     * @param bool $capitalise_first_char If true, capitalise the first char in $str
     * @return string $str translated into camel caps
     */
    public static function to_camel_case($str, $capitalise_first_char = false)
    {
        if ($capitalise_first_char) {
            $str[0] = strtoupper($str[0]);
        }
        $func = create_function('$c', 'return strtoupper($c[1]);');
        return preg_replace_callback('/_([a-z])/', $func, $str);
    }
}